From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116467 invoked by alias); 5 Sep 2018 20:15:07 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 116246 invoked by uid 89); 5 Sep 2018 20:15:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-101.4 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.187) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Sep 2018 20:15:03 +0000 Received: from calimero.vinschen.de ([217.91.18.234]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M7v18-1ftmac2TJK-004xWC for ; Wed, 05 Sep 2018 22:15:00 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 6D008A820B6; Wed, 5 Sep 2018 22:14:59 +0200 (CEST) Date: Wed, 05 Sep 2018 20:15:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Cygwin fails to utilize Unicode replacement character Message-ID: <20180905201459.GN6350@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20180905075528.GA22010@calimero.vinschen.de> <5b8fc4ea.1c69fb81.3d08d.d585@mx.google.com> <20180905155830.GM6350@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="44sYDrpRTlpaXQDy" Content-Disposition: inline In-Reply-To: <20180905155830.GM6350@calimero.vinschen.de> User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-09/txt/msg00104.txt.bz2 --44sYDrpRTlpaXQDy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2609 On Sep 5 17:58, Corinna Vinschen wrote: > On Sep 5 15:18, Marco Atzeri wrote: > > Am 05.09.2018 um 13:58 schrieb Steven Penny: > > > On Wed, 5 Sep 2018 09:55:28, Corinna Vinschen wrote: > >=20 > > > Using this file: > > >=20 > > > =C2=A0=C2=A0 $ cat glyph.c > > > =C2=A0=C2=A0 #include > > > =C2=A0=C2=A0 #include > > > =C2=A0=C2=A0 int main() > > > =C2=A0=C2=A0 { > > > =C2=A0=C2=A0=C2=A0=C2=A0 CONSOLE_FONT_INFOEX ta; > > > =C2=A0=C2=A0=C2=A0=C2=A0 ta.cbSize =3D sizeof ta; > > > =C2=A0=C2=A0=C2=A0=C2=A0 GetCurrentConsoleFontEx(GetStdHandle(STD_OU= TPUT_HANDLE), 0, &ta); > > > =C2=A0=C2=A0=C2=A0=C2=A0 HDC wh =3D GetDC(0); > > > =C2=A0=C2=A0=C2=A0=C2=A0 SelectObject(wh, > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 CreateFontW(0, 0, 0, 0, 0, 0, 0= , 0, 0, 0, 0, 0, 0, ta.FaceName)); > > > =C2=A0=C2=A0=C2=A0=C2=A0 WCHAR xr[4] =3D {0xFFFD, 0x2592, 0x25A1, 0x= 01C4}; > > > =C2=A0=C2=A0=C2=A0=C2=A0 WORD zu[4]; > > > =C2=A0=C2=A0=C2=A0=C2=A0 GetGlyphIndicesW(wh, xr, 4, zu, 1); > > > =C2=A0=C2=A0=C2=A0=C2=A0 printf("%ls:\n", ta.FaceName); > > > =C2=A0=C2=A0=C2=A0=C2=A0 for (int q =3D 0; q < 4; q++) { > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 printf("=C2=A0 U+%04X: %s\n", > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 xr[q], zu[q] =3D=3D 0xffff ? "f= ailure" : "success"); > > > =C2=A0=C2=A0=C2=A0=C2=A0 } > > > =C2=A0=C2=A0 } > > >=20 > > > I get this result: > > >=20 > > > =C2=A0=C2=A0 DejaVu Sans Mono: > > > =C2=A0=C2=A0=C2=A0=C2=A0 U+FFFD: success > > > =C2=A0=C2=A0=C2=A0=C2=A0 U+2592: success > > > =C2=A0=C2=A0=C2=A0=C2=A0 U+25A1: success > > > =C2=A0=C2=A0=C2=A0=C2=A0 U+01C4: failure > > >=20 > >=20 > > Strange on W10 CMD I obtain > >=20 > > DejaVu Sans Mono U+FFFD: failure > ^^^ > You see this? There's something really fishy here. I see a similar > effect which somehow depends on arbitrary changes to the source file: >=20 > - Sometimes I get "DejaVu Sans Mono" in FaceName and all works well. > - Sometimes I get "DejaVu Sans Mono\1" or "DejaVu Sans Mono\6" and > the subsequent GetGlyphIndicesW returns failures for many or all > characters. >=20=20=20 > I'm trying to find what's affecting this for hours, but I don't get any > conclusive results :( OTOH, in my testing this only occurs for DejaVu Sans Mono. I installed Liberation Mono and Noto Mono as well and the above problem never occurs with them. Weird. I'm about to let this slip as a font bug. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --44sYDrpRTlpaXQDy Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAluQOUMACgkQ9TYGna5E T6DAhg/9EX20LITLA8AS6hakekg08dBYhhXLKnLcENLbBZcQJSrDXTF7yjHyYD1B hzyjaKkUZunnhFYmuwMy6D9WGbYm6KbxyUC84mQCfYowXC8mDZaqyIwTm8PMVNXq l3qkmb1LahiJdNt16EhpLK766+tLDGx39pWSOvPaG225GgmfqMzkz0wRsdgwFjK5 ZdD9u68VTeB3waA+/qqN+aqUevaRmFVK5Z/qPMr5Fst2YTy2NTVLd2tUPILVX1/r h0VMy/NP0yWjNXDl5PvEj6J0makLHrRkEFvehJYybbU8rpYY9w6g1bD2vvocuYYx Q/M7h0b9Md7B4sgV/41NRomOCS9Sppgz1/dAqVAGnXcttQeUGvGDqrXRYaTh0buM uiL9W0elnLdcVYGklciThjg3ucRK6kQP/evc8TbTx53RnYNG4TJPs1Nvi6LqYviI RVKkcnj4MBkuKP6Cqu39jJmP2PMDUKkRcaiopnGGJ5EZJYViAE3dTFDIReQjjnWB EvZXWGQCJD0BIn6Qd53raNHHegagcx6ZPz9DJMXemqzjVW+7ws9LDSuJCRFSHoJq OJ2vttgRn55jlGJ6UDssWT5KmksW/nWINC30PcPsTlUZ/jtMb2XQUfy/56Ow0FDr m26DacRfWXfC+ubSDGmQpIV6ViIRQAgE6k27jPF/8EpHUuSGmNo= =U1w9 -----END PGP SIGNATURE----- --44sYDrpRTlpaXQDy--