googlefonts / noto-emoji

Noto Emoji fonts
SIL Open Font License 1.1
3.8k stars 457 forks source link

Font request not up to date (Android) #341

Open quentin7b opened 3 years ago

quentin7b commented 3 years ago

Hi !

I'm not sure this is the right place to post it. Anyway. I tried to use the Noto Color Emoji Compat from Android Jetpack EmojiCompat libary.

As explained in the example, best way to reduce bundle size is to use a FontRequest like this

val fontRequest = FontRequest(
            "com.google.android.gms.fonts",
            "com.google.android.gms",
            "Noto Color Emoji Compat",
            R.array.com_google_android_gms_fonts_certs
        )

        val fontRequestConfig = FontRequestEmojiCompatConfig(applicationContext, fontRequest)

        EmojiCompat.init(
            fontRequestConfig
                .setReplaceAll(true)
                .setUseEmojiAsDefaultStyle(true)
        )

With a callback notifying when loaded.

The thing is: It is not working.

As far as I can tell, looking on the website nothing has been updated since 2017 (which matches the Emojis I can see or not, Emoji 5.0 are ok , 11 are not).

Anyway I tried with the BundledEmojiCompatConfig(this) instead of the FontRequestEmojiCompatConfig because I can see that this repository is up to date with Emoji 13.1 and it works fine ! But my app is quite big.

Is there another repo for the font-request ? Am I wrong somewhere ? For now I can go with BundledEmojiCompatConfig(this) but it's kind of sad that FontRequestEmojiCompatConfig isn't working as it is the recomended way.

Thanks for any help

PS: Here are two screenshots, first working (except face smiling with tears) with BundledEmojiCompatConfig, second with FontRequestEmojiCompatConfig

BundledEmojiCompatConfig FontRequestEmojiCompatConfig
ChiefMikeK commented 3 years ago

Recommend that you star🌟 this related issue⤵
EmojiCompat didn't display 🥰 when initializing with FontRequestEmojiCompatConfig on API 23 [157954437] - Public Issue Tracker

➕ create new issue and link here for increased visablity. https://issuetracker.google.com/issues/new?component=460938&template=1422574

quentin7b commented 3 years ago

@ChiefMikeK ! Doing it right now :) Thanks !