entria / react-native-fontawesome

React Native Font Awesome Icons
MIT License
176 stars 34 forks source link

Unrecognized font family "FontAwesome" #29

Open Luckygirlllll opened 6 years ago

Luckygirlllll commented 6 years ago

I got an error "Unrecognized font family "FontAwesome", after the adding library to the project. How is possible to fix that?

orcjun commented 6 years ago

Did you check the version of FontAwesome??

Version 4.7.0 works fine with me

Here's your download URL

https://fontawesome.com/v4.7.0/

ghost commented 6 years ago

I get this same error and I followed the instructions to add the font file via the links given. @rturk @arnebr

paul-hart commented 6 years ago

Having the same issue. I think you need to download / install the ttf manually. It does not say what the naming convention is.

ghost commented 6 years ago

I think you need to download / install the ttf manually

@paul-hart did you figure it out? I downloaded manually but still same issue.

grobmeier commented 6 years ago

Running into the same issue. I found out you have to do the following (it's missing from the instructions):

  1. Download the Font from the link mentioned in this issue
  2. Put the font into your project folder. I used /myproject/assets/fontawesome for that, not the /myproject/ios folder.
  3. Add the font to your ios build like here: https://medium.com/@dabit3/adding-custom-fonts-to-react-native-b266b41bff7f
  4. do react-native run-ios and restart your simulator

Note: you can add the font from your project folder, no need to manually copy it.

thorlando commented 6 years ago

With the very latest version of the free FontAwesome that I just downloaded, its font name (not filename) is "FontAwesome5FreeRegular" and not "FontAwesome". So renaming the fontFamily in Icon.js to "FontAwesome5FreeRegular" fixes this for me.

imansalhi commented 6 years ago

same problem

KovalevAnton commented 5 years ago

Same issue. Unrecognized font family "FontAwesome" error in simulator.

sfratini commented 5 years ago

Actually the font family in iOS is now "Font Awesome 5 Free" (FA really broke everything this time).

Import Platform into Icons.js and add this:

FAB: Platform.OS == 'ios' ? "Font Awesome 5 Free" : 'fa_solid_900'

Weird that nobody reported this.

javicorvus commented 4 years ago

In my case I just grabbed the sample project fonts and used those instead of the broken new ones, it worked and I didn't had to modify any file.