Screenshots (warning: large)
You get my point. They work the same way KitKat's colour emojis work.
- Grab AppleColorEmoji.ttf and place it into /system/fonts/
- Set /system/fonts/AppleColorEmoji.ttf to have permissions 644 (rw-r--r--) and owner:group root:root.
- Modify /system/etc/fallback_fonts.xml like so:
- Find Code:
<family> <fileset> <file>AndroidEmoji.ttf</file> </fileset> </family>
- Above this block, add Code:
<family> <fileset> <file>AppleColorEmoji.ttf</file> </fileset> </family>
- Set /system/etc/fallback_fonts.xml to have permissions 644 (rw-r--r--) and owner:group root:root.
What I did:
- Asked someone (jakew02 on #cyanogenmod-dev) to help me grab Apple Color Emoji.ttf off an OS X 10.9 system.
- Used code available here to extract the PNG files from the TTF file's SBIX table.
- Used fonttools (ttx) to create an empty TTF file based on the original Apple Color Emoji.ttf and this template by Google
- Used this code by Google to add the extracted PNGs into the empty TTF file in CBDT/CBLC (the OpenType extension Google created) tables
- Took the resulting TTF file and threw it into /system/fonts/, modifying /system/etc/fallback_fonts.xml accordingly
The font size and kerning (all the emojis are the same size!) doesn't seem all that great, but someone who knows fonts better can fix that using ttx. If anyone wishes to create a flashable zip for this, please do so.
Thank Google for deciding to implement colour emoji (and releasing their tools for creating those fonts too!) in KitKat, because they essentially did all the work.
I also used https://github.com/behdad/fonttools to decompile NotoColorEmoji.ttf to decide what resolution PNG files to use, but this isn't strictly required (the Apple TTF file has 160x160px files which can be used directly; I ended up resizing those files to 128x128px).
I can't for the life of me get XDA attachments to work.