Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[MOD] Apple Color Emoji system-wide for KitKat

$
0
0
Not sure if this has been done before, but here is my work.

Screenshots (warning: large)
 






You get my point. They work the same way KitKat's colour emojis work.

To install:
  1. Grab AppleColorEmoji.ttf and place it into /system/fonts/
  2. 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>

  3. Reboot.

What I did:
  1. Asked someone (jakew02 on #cyanogenmod-dev) to help me grab Apple Color Emoji.ttf off an OS X 10.9 system.
  2. Used code available here to extract the PNG files from the TTF file's SBIX table.
  3. Used fonttools (ttx) to create an empty TTF file based on the original Apple Color Emoji.ttf and this template by Google
  4. Used this code by Google to add the extracted PNGs into the empty TTF file in CBDT/CBLC (the OpenType extension Google created) tables
  5. Took the resulting TTF file and threw it into /system/fonts/, modifying /system/etc/fallback_fonts.xml accordingly
And it works. This is unlikely to work on versions of Android pre-KitKat, unless support for CBDT/CBLC tables in font files is present (or backported from KitKat).

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.

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>