Mail Archives: cygwin/2018/09/05/16:15:27
--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 <stdio.h>
> > > =C2=A0=C2=A0 #include <windows.h>
> > > =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--
- Raw text -