Re: Font rendering question - Apple Color Emoji.ttc

Andrew Murray <[email protected]> Wed, 5 Jun 2024 10:26:16 +1000
Newsgroups gmane.comp.fonts.freetype.user
Message-ID <[email protected]>
Hi,

Just following this up to make sure it isn=E2=80=99t forgotten. If =
it=E2=80=99s still in the to-do list and it=E2=80=99ll simply take time =
to look at it, no problem.

Thanks

> On 25 May 2024, at 5:26=E2=80=AFPM, Andrew Murray =
<[email protected]> wrote:
>=20
> Hi,
>=20
> Over at Python Pillow, a user has tried to render an emoji with =
macOS=E2=80=99 Apple Color Emoji.ttc - =
https://github.com/python-pillow/Pillow/issues/7854#issuecomment-212808809=
0. The emoji is the combination of =E2=80=98woman=E2=80=99 U+1F469, =
'zero width joiner=E2=80=99 U+200D, 'manual wheelchair=E2=80=99 U+1F9BD, =
'zero width joiner=E2=80=99 U+200D, 'black rightwards arrow=E2=80=99 =
U+27A1, 'variation selector-16=E2=80=99 U+FE0F, with the intention of =
being a woman in a manual wheelchair facing right.
>=20
> However, FreeType returns an Unimplemented_Feature error. Interesting, =
it only doesn=E2=80=99t do this for just a woman in a manual wheelchair. =
To demonstrate, the following code attempts to use woman in a manual =
wheelchair, and then woman in a manual wheelchair facing right. The =
error only occurs in the second instance.
>=20
> FT_Library library;
> FT_Init_FreeType(&library);
> FT_Face face =3D NULL;
> FT_New_Face(library, "/System/Library/Fonts/Apple Color Emoji.ttc", 0, =
&face);
> FT_Set_Pixel_Sizes(face, 0, 64);
> int error =3D FT_Load_Glyph(face, 1507, FT_LOAD_DEFAULT);
> if (error) {
> 	printf("1507: error %d\n", error);
> }
> error =3D FT_Load_Glyph(face, 1508, FT_LOAD_DEFAULT);
> if (error) {
> 	printf("1508: error %d\n", error);
> }
>=20
> I=E2=80=99ve attached images that, as far as I can see, show that both =
indexes are present in the font.
>=20
> Any thoughts as to why one should fail but not the other would be =
appreciated. Thanks.
>=20
> <1507.png><1508.png>