X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=mOKvP0Vuv45pdb7xGiZagODG/Rhu84HXsRfVj91jhaM4v1kPA3pM1 3+KAs5X7kt+tdJTqhJu/OXFO0kMxnArO6f/2oUHrPCE4HWkZxbFp8QYNCbYBglAm QC32D/NxV0j9TgIEllPI4/4gtYtfA4auQgbKjwLgBmv9EjRekG+O/Y= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=kFPYN6LXK2eGC64vZwzcQgbPxKE=; b=iHvFD6o/IWPwu93dji17HK2SUpjA YU1jB3tE05NB7tWPIlY1bjyxz9X+SCEKp55n5dkerEt4kQiNQ10yxQ+OVtatiA9k QTs5jkBdeeh2uFrgKJHaZU1Arw7h0SEmTwX0sgg6nt30t3PuboTeVjBPAkZTFoir /fiEpzDHL2D7E+Q= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Wed, 5 Sep 2018 22:14:59 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Cygwin fails to utilize Unicode replacement character Message-ID: <20180905201459.GN6350@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20180905075528 DOT GA22010 AT calimero DOT vinschen DOT de> <5b8fc4ea DOT 1c69fb81 DOT 3d08d DOT d585 AT mx DOT google DOT com> <20180905155830 DOT GM6350 AT calimero DOT vinschen DOT 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) --44sYDrpRTlpaXQDy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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" -----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--