AstrOOnauta / react-native-international-phone-number

⚛️ International mobile phone number input component for React Native 📱
https://snack.expo.dev/@astroonauta/react-native-international-phone-number
ISC License
279 stars 52 forks source link

Can I remove very heavy font TwemojiMozilla? #32

Closed SergiOnGit closed 1 year ago

SergiOnGit commented 1 year ago

This font is 1.2MB which is very big, why is it needed and can I remove or replace it?

AstrOOnauta commented 1 year ago

Hey @SergiOnGit good question!

For now, I need that font to display the flags icons in all platforms (RN Web, for example). So, if you have any solutions to this...please, share with us =)

🚀 AstrOOnauta 🚀

SergiOnGit commented 1 year ago

Hey @SergiOnGit good question!

For now, I need that font to display the flags icons in all platforms (RN Web, for example). So, if you have any solutions to this...please, share with us =)

🚀 AstrOOnauta 🚀

You can just include all country flag icons, maybe png. One flag icon can be max 2KB. So, It will be much smaller.

AstrOOnauta commented 1 year ago

@SergiOnGit I released a new version fixing this point: font TwemojiMozilla.ttf (1.2MB) to TwemojiMozilla.woff2 (0.4MB)

So, please update your lib to latest v0.6.7

🚀 AstrOOnauta 🚀

SergiOnGit commented 1 year ago

That's great! Thanks.

ethras commented 1 year ago

I'm facing issue with .woff2 font in expo. I get an "sha-1 for file is not computed" when trying to load the font

AstrOOnauta commented 1 year ago

@ethras try to put the font file inside assets name of folder something like the snack example.

ser-emejia commented 1 year ago

@ethras try to put the font file inside assets name of folder something like the snack example.

I'm having issues, I can't load the font, I did what you mention here but does not work

AstrOOnauta commented 1 year ago

@ser-emejia what is your issue? please, try to open a new issue with more details...

ser-emejia commented 1 year ago

@ser-emejia what is your issue? please, try to open a new issue with more details...

Of course man 👍