React-native-vector-icons: Font Awesome Pro Icon Android iOS Naming Configuration

Created on 10 Sep 2018  路  2Comments  路  Source: oblador/react-native-vector-icons

I properly followed configuration guides for both android and iOS but font awesome pro icons only showed up in iOS. There were only blank squares in android emulator screen. I tried everything suggested but nothing worked. After a some time I even realized that I can only use light type icons in iOS.

Eventually I have found out that the reason was just naming. I didn't upgrade using fa5-upgrade.sh, instead I copied my already downloaded icon files.

Here is the fa5-upgrade.sh:
https://github.com/oblador/react-native-vector-icons/blob/master/bin/fa5-upgrade.sh

It is required to rename files downloaded from FontAwesome to make it work.
Android : Font Awesome 5 Pro-Light-300 -> FontAwesome5_Pro_Light
iOS: Font Awesome 5 Pro-Light-300 -> Font Awesome 5 Pro_Light

Naming is different because FontAwesome5Pro.js uses them platform dependent. You can check in the source code.

If you have a problem with this method, please let me know; I would give a try in my code.

Hope it helps.

Most helpful comment

FontAweseome5 is platform dependant since that's the way the lib is designed (which is due to how fonts are handled on iOS/Android).

@OsmanCure Feel free to submit a PR that updates the docs in a satisfying way 馃檪

Why was this designed to be so fragile?!

@Paul-Lategan No one is forcing you to use this FREE lib which some of us spent a lot of time working on, write a better one yourself and upload it so people can enjoy its awesomeness. It took over 6 months before support was added for FontAwesome 5 and I can tell you that it was harder to integrate than other fonts. It is still not working 100% so please, feel free to submit a PR. Being disrespectful towards other peoples work, made available for free, is what I truly hate about open source...

All 2 comments

FontAweseome5 is platform dependant since that's the way the lib is designed (which is due to how fonts are handled on iOS/Android).

@OsmanCure Feel free to submit a PR that updates the docs in a satisfying way 馃檪

Why was this designed to be so fragile?!

@Paul-Lategan No one is forcing you to use this FREE lib which some of us spent a lot of time working on, write a better one yourself and upload it so people can enjoy its awesomeness. It took over 6 months before support was added for FontAwesome 5 and I can tell you that it was harder to integrate than other fonts. It is still not working 100% so please, feel free to submit a PR. Being disrespectful towards other peoples work, made available for free, is what I truly hate about open source...

I am explicitly writing required font names for those who get confused by my explanation above.

iOS
Font Awesome 5 Brands_Regular
Font Awesome 5 Pro_Light
Font Awesome 5 Pro_Regular
Font Awesome 5 Pro_Solid

Android
FontAwesome5_Pro_Brands
FontAwesome5_Pro_Light
FontAwesome5_Pro_Regular
FontAwesome5_Pro_Solid

Feel free to submit a PR that updates the docs in a satisfying way 馃檪

@hampustagerud I will definitely check the documentation and submit a PR if it is still not clear.

Was this page helpful?
0 / 5 - 0 ratings