Font rendering question - Apple Color Emoji.ttc

Andrew Murray <[email protected]> Sat, 25 May 2024 17:26:26 +1000
Newsgroups gmane.comp.fonts.freetype.user
Message-ID <[email protected]>
Hi,

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.

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.

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);
}

I=E2=80=99ve attached images that, as far as I can see, show that both =
indexes are present in the font.

Any thoughts as to why one should fail but not the other would be =
appreciated. Thanks.

=EF=BF=BC=EF=BF=BC=