Re: Font rendering question - Apple Color Emoji.ttc

Andrew Murray <[email protected]> Fri, 14 Jun 2024 23:53:06 +1000
Newsgroups gmane.comp.fonts.freetype.user
Message-ID <[email protected]>
After failing to figure out run a debug build of FreeType and get the =
output, I started just investigating with print statements.

I found that the error is coming from =
https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/src/sfnt/tt=
sbit.c?ref_type=3Dheads#L1555 - the =E2=80=98graphicType=E2=80=99 tag =
that is unsupported is =E2=80=98flip=E2=80=99. This makes sense for =
'woman in a manual wheelchair facing right=E2=80=99.

The successful character on the other hand, 'woman in a manual =
wheelchair=E2=80=99, is has the graphic type =E2=80=98png =E2=80=98.

So this is indeed a feature that FreeType doesn=E2=80=99t support. I =
gather from your response that this is not at all a priority. Should I =
create an issue this over at =
https://gitlab.freedesktop.org/freetype/freetype, or should I just leave =
it be? Alternatively, if I felt inspired, and somehow figured this out, =
would it be worthwhile for me to create a merge request?

Thanks for your time.

> On 9 Jun 2024, at 2:23=E2=80=AFAM, Werner LEMBERG <[email protected]> wrote:
>=20
>=20
> Hello Andrew,
>=20
>=20
> sorry for the late reply.
>=20
>> Over at Python Pillow, a user has tried to render an emoji with
>> macOS=E2=80=99 Apple Color Emoji.ttc -
>=20
> I don't have this font.  I only have the ancient `Apple Color
> Emoji.ttf` version 8.0d7e1 from 2012...  Without having that font I
> can only do an educated guess.
>=20
>> =
https://github.com/python-pillow/Pillow/issues/7854#issuecomment-212808809=
0
>=20
> Looking at this report it seems that somehow the image should be
> mirrored horizontally =E2=80=93 I guess this is the problem with =
FreeType.
>=20
> Please remember that color emoji rendering support within FreeType is
> *very* limited and only partially implemented =E2=80=93 it is *not* =
intended
> as a general solution but rather as a last resort for people who won't
> do the color bitmap blitting by themselves.
>=20
> Rendering support of Emojis is a border case, since FreeType is
> decidedly *not* a graphics library.
>=20
>> [some C code omitted]
>=20
> You can get much more information if you do a debug build of FreeType,
> then setting the environment variable
>=20
>  FT2_DEBUG=3Dany:7
>=20
> and redirect the stderr output of your demo program to a file.
>=20
>> I=E2=80=99ve attached images that, as far as I can see, show that =
both
>> indexes are present in the font.
>=20
> You haven't attached images, AFAICS.
>=20
>=20
>    Werner