Override default emojis with emojione TTF on iOS app #363
Comments
I'm having the exact same issue and I don't know how to stop if from getting rid of the original emojis. |
Hi @KieranLafferty, could you take a look at this tutorial? http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/ Let me know if this is helpful in getting the font to work in your app. |
It didn't help sorry. I'm trying to change the file name because it On 29 September 2016 at 22:09, Casey A Henson notifications@github.com
|
Thanks for the suggestion @caseyahenson. As @Tmason1 mentioned there is a naming conflict with the original AppleColorEmoji font family name which UIFont use the system font instead of the custom ttf. Not sure if renaming the font family to something like EmojioneColorEmoji would allow for this to be loaded properly using UIFont. I've tried renaming the font using FontForge (ttf editing software) but with my limited experience creating/editing fonts wasn't able to get it working properly (system detected that the font was created incorrectly, wasn't clear what the solution was). |
Even if I change the file name nothing happens. The system font name stays On 3 October 2016 at 05:13, Laff notifications@github.com wrote:
|
Yea its not about the file name you actually have to edit the font at the data level. Open up your renamed font in Font Book and it will still say AppleColorEmoji (which is the font family name) this needs to be edited using a program like FontForge to change the font data |
yeah I've changed it in font forge already but it removes the emoji On 3 October 2016 at 19:43, Laff notifications@github.com wrote:
|
@KieranLafferty @Tmason1 It's out-of-the-box compatible with EmojiOne, although you'll just get fallbacks for some zero-width joiner sequences since they're not implemented into EmojiOne as of yet. |
Any luck by doing this? I'm struggling trying to integrate Emoji One font in iOS... |
@ManuelOrtega – the fonts won't really work as intended in iOS apps, likely because the AppleColorEmoji font overrides any other font when encountering emoji. However, if you're willing to settle for an image-based solution to replace the standard emoji with EmojiOne, see my above answer. The framework is quite lightweight, and works on |
no the problem is with the font, other fonts work. It's because the
EmojiOne's file basename is "AppleColorEmoji". All I need to do is change
it that's all. But i don't know how. Changing name of the file doesn't
change it's base name. That's the only reason why it overrides. Because
they have the same name.
…On 18 April 2017 at 09:43, Dan ***@***.***> wrote:
@ManuelOrtega <https://github.com/ManuelOrtega> – the fonts won't really
work as intended in iOS apps, likely because the AppleColorEmoji font
overrides any other font when encountering emoji.
However, if you're willing to settle for an image-based solution to
replace the standard emoji with EmojiOne, see my above answer. The
framework is quite lightweight, and works on UILabel and UITextView. You
can check out the provided example app for usage and how it performs.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#363 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AVZJIa-DHiBp4CUBOp2ASnlOEMB5uTQ7ks5rxHemgaJpZM4KFfRE>
.
|
@KieranLafferty @Tmason1 I found this and then I used TTFEdit to rename the font to this font name - "AppleColorEmojiOne". And now I can use this new ttf file and include in the project. I did this to use it and it works fine -
@caseyahenson I will be happy to make PR to include this file with new font name while keeping the original one in fonts. |
how do I download it?
…On 9 May 2017 at 19:44, Saurabh Rane ***@***.***> wrote:
@KieranLafferty <https://github.com/KieranLafferty> @Tmason1
<https://github.com/Tmason1> I found this
<https://superuser.com/a/1050076> and then I used TTFEdit
<https://sourceforge.net/projects/ttfedit/> to rename the font to this
font name - "AppleColorEmojiOne".
And now I can use this new ttf file and include in the project. I did this
to use it and it works fine -
let font = UIFont(name: "AppleColorEmojiOne", size: 20)
I will be happy to make PR to include this file with new font name while
keeping the original one in fonts
<https://github.com/Ranks/emojione/tree/master/extras/fonts>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#363 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AVZJIeT8SGrCjBt-qEfcqOswQl2c1iKpks5r4LQegaJpZM4KFfRE>
.
|
Using this link. |
I can't find the font in the files
…On 9 May 2017 at 20:33, Saurabh Rane ***@***.***> wrote:
Using this link
<https://sourceforge.net/projects/ttfedit/files/latest/download>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#363 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AVZJIfdIXJABLtDYhgrQ5VwiiCXvZauHks5r4L-LgaJpZM4KFfRE>
.
|
it's just a zip file with lots of fonts
…On 9 May 2017 at 21:12, Afro Gamer ***@***.***> wrote:
I can't find the font in the files
On 9 May 2017 at 20:33, Saurabh Rane ***@***.***> wrote:
> Using this link
> <https://sourceforge.net/projects/ttfedit/files/latest/download>.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#363 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AVZJIfdIXJABLtDYhgrQ5VwiiCXvZauHks5r4L-LgaJpZM4KFfRE>
> .
>
|
You just have to open After I tried to check all the icons using this new ttf file with new font name, many icons do not show up in the simulator. (almost all flag icons, and icons with different tones, etc.) |
@KieranLafferty @Tmason1 Until we figure out how to change font name without affecting emoji icons, we can use this library. |
Is this ever going to be fixed? |
I think all we need is for EmojiOne to post a new .ttf with a different postscript name. I was able to get it partially working by opening the font with Glyphs, changing the postscript name and exporting, but then some of the zero width joiner sequences stopped working in my app. I don't know how to fix them. I didn't have any luck with FontForge or TTX either. I think all we need is a .ttf file that is exactly the same as what's on the download page, with the name changed. |
I got it working! (slightly hacky, but...) I opened the .ttf file with TextEdit, find/replaced "Emoji" with "Emoj2". The trick if you edit the binary file directly is that you have to change the font family and postscript name, but keep the names the same length so you don't mess up the file. If you do that, then you can add the .ttf file to your app in the usual way, and then use "AppleColorEmoj2" as your font name when you look it up with UIFont. |
Hello,
I have been trying to add the TTF font for iOS/Mac to my app without any success. I am trying to have it override the system emojis within app to use the emojione assets instead of the apple default ones.
I've tried adding AppleColorEmoji@2x.ttf to my project and explicitly setting the font to "AppleColorEmoji" for the particular label. Despite many different attempts emojis always show with the Apple default behavior. Is it possible to have set the font such that any emoji chars are rendered with the emojione assets?
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: