FORUMS

XPrivacy for Android Lollipop – XDA Xposed Tuesday

Have you ever been on the Google Play Store and saw an app that you wanted to … more

How a HTC Droid Eris Changed a Members Life

Rarely can a member say that Android development or XDA had a profound effect on … more

XDA Office Space: Frankenstein’s Perfect IM Client?

The portal’s decentralized XDA office lies in a Hangouts chatroom, where … more

Which IM Client on Android is best?

With so many different messengers to choose from, it can be tough to find the best one for you and … more
Post Reply Subscribe to Thread Email Thread

[MOD] Apple Color Emoji system-wide for KitKat

10th December 2013, 05:11 PM |#1  
angelsel's Avatar
OP Member
Flag Singapore
Thanks Meter: 129
 
More
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. Set /system/fonts/AppleColorEmoji.ttf to have permissions 644 (rw-r--r--) and owner:group root:root.
  3. 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>
  4. Set /system/etc/fallback_fonts.xml to have permissions 644 (rw-r--r--) and owner:group root:root.
  5. Reboot.
(Thanks cclaxx for mentioning permissions!)

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).


Update: No need to do all this anymore. Later versions of Android support sbix out of the box. Just adjust the platEncID/platformID in the cmap of AppleColorEmoji.ttf.

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.
Last edited by angelsel; 14th May 2015 at 03:36 PM.
The Following 105 Users Say Thank You to angelsel For This Useful Post: [ View ]
 
 
13th December 2013, 11:52 AM |#2  
Senior Member
Thanks Meter: 204
 
More
Looked for it great

How did you do the fourth step?
im running windows and couldnt launch it.
I want to port Touchwiz Smileys to KitKat.
Those looking best
The Following User Says Thank You to yener90 For This Useful Post: [ View ]
14th December 2013, 07:23 AM |#3  
angelsel's Avatar
OP Member
Flag Singapore
Thanks Meter: 129
 
More
Use Python 2.7.

I did this all on Linux, so I'm not sure if this can be done on Windows or not. But since all the tools are written in Python, I'd imagine that it can with minimal effort.
The Following 2 Users Say Thank You to angelsel For This Useful Post: [ View ]
21st December 2013, 09:30 PM |#4  
Member
Flag Bergamo
Thanks Meter: 4
 
Donate to Me
More
Hi, I have just tried this on Android 4.4.2 (root, stock kernel & ROM) and it didn't work although I have followed your guide step-by-step. Any thoughts?
21st December 2013, 11:53 PM |#5  
hhamzah49's Avatar
Senior Member
Flag Den Haag
Thanks Meter: 30
 
More
Also didnt work for me. Omni rom 4.4.2
25th December 2013, 09:14 PM |#6  
Senior Member
Flag Vienna
Thanks Meter: 36
 
More
Sadly it also doesn't work for me! Please could you try fixing it? I love the idea!
The Following 2 Users Say Thank You to Fusionalex For This Useful Post: [ View ]
25th December 2013, 10:03 PM |#7  
cclaxx's Avatar
Senior Member
milano
Thanks Meter: 48
 
More
Quote:
Originally Posted by Jaggions

Hi, I have just tried this on Android 4.4.2 (root, stock kernel & ROM) and it didn't work although I have followed your guide step-by-step. Any thoughts?

Quote:
Originally Posted by hhamzah49

Also didnt work for me. Omni rom 4.4.2

Quote:
Originally Posted by Fusionalex

Sadly it also doesn't work for me! Please could you try fixing it? I love the idea!

guys maybe the problem are the permissions. you must set both files to rw-r-r otherwise it does not work.
The Following 2 Users Say Thank You to cclaxx For This Useful Post: [ View ]
25th December 2013, 10:24 PM |#8  
Member
Flag Bergamo
Thanks Meter: 4
 
Donate to Me
More
Quote:
Originally Posted by cclaxx

guys maybe the problem are the permissions. you must set both files to rw-r-r otherwise it does not work.

Oh, you're right, it worked! I feel so stupid :P Thank you!
25th December 2013, 10:30 PM |#9  
hhamzah49's Avatar
Senior Member
Flag Den Haag
Thanks Meter: 30
 
More
Quote:
Originally Posted by cclaxx

guys maybe the problem are the permissions. you must set both files to rw-r-r otherwise it does not work.

Thanks! works! love it!
26th December 2013, 08:16 AM |#10  
Senior Member
Flag Vienna
Thanks Meter: 36
 
More
Quote:
Originally Posted by cclaxx

guys maybe the problem are the permissions. you must set both files to rw-r-r otherwise it does not work.

Thank you so much it works perfectly! I love this!
Maybe someone should create a flashable zip to make this easier tho

EDIT:
I quickly tried to make a flashable zip. Never did this before so I'm not sure if I did it right. Maybe someone can check it and tell me if everything should work
I took the update-binary from CM11 because I wasn't sure if the older one from the tutorial I read would work.
http://ge.tt/8kOOWOB1?c
I don't know if it works and if it doesn't I am not responsible for any damage done to your devices. I just hope someone here who has more experience than me can check it out and confirm if it works
Last edited by Fusionalex; 27th December 2013 at 07:19 AM. Reason: Updated link
The Following 6 Users Say Thank You to Fusionalex For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread