TTF Fonts

I've a niggling mini-project to write code to insert new emoji into my mac's system emoji font file. For no good reason than to say that I can, I'm wondering whether I can (for example) show ๐Ÿ + the zero-width-joiner + ๐Ÿšฒ as a newly inserted glyph of Deliveroo's logo. Naturally this wouldn't be useful to anyone except myself (as no-one else would have this glyph), but I'm using it as a way to learn how TrueType Fonts are put together.

I've found the docs on the OpenType spec at Microsoft, as well as the TrueType reference at Apple, but there is a lot. I think I need to start with making a trivial font with a tool like Glyphs (which I used to make Caspian) or FontForge, and seeing what's created. There is definitely bytecode in the Apple Emoji TTF fileโ€ฆ

Zero Width Joiner

The ZWJ is a non-visible unicode character that can be used to link codepoints together into single glyphs or more accurately, as wikipedia tells me, indicates that the following grapheme is positioned relative to the previous one.

The classic example for me is the various family emoji, which look like this: ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ

That particular one is ๐Ÿ‘จ + ZWJ + ๐Ÿ‘ฉโ€๐Ÿฆฐ + ZWJ + ๐Ÿ‘ฆ + ZWJ + ๐Ÿ‘ฆ โ€” so a full 7 multi-byte characters for a single glyph! Then of course you can add skin colour indicators for each of the members of the family, and you can rapidly get to enormous single "characters".

I saw a post recently that called out the Welsh flag emoji ๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ as the longest flag, being ๐Ÿด + the letters gbwls + โ˜. Designing emoji fonts must be a multi-year effort at this point!