Developer
Developer

Reputation: 1813

How does the Apple color emoji font work, and is there an Android version?

I saw that on iPhone there is a truetype font called Apple Color Emoji. It contains the emoticons that exist on iPhones which can be used in any application.

I wonder:

  1. How is this font displayed in multicolor?! Truetype fonts can only include black and white glyphs.
  2. Can this font, or one like it, be used on Android phones?

Upvotes: 14

Views: 9070

Answers (2)

13rac1
13rac1

Reputation: 1117

  1. The font uses embedded PNGs and they are stored in a sbix table.
  2. Apple Color Emoji cannot be used in Android, but a Google CBLC/CBDT formatted font can.

There are four methods for implementing color in Open Type fonts right now:

The complete list of OpenType tables.

You can disassemble/reassemble the font using ttx from FontTools(pypi, github) for more details.

Upvotes: 5

natevw
natevw

Reputation: 17932

Apple is using a proprietary extension to the OpenType standard. Basically, they just store pre-rasterized color PNGs in a proprietary extension "block" within the TTF file (reference, corroboration).

The only reason this works is because they also provide the full stack between that font extension and the screen (font rasterization, system graphics library, text rendering widgets). There's no standardized way to accomplish this across all platforms/libraries.

Upvotes: 13

Related Questions