entria / react-native-fontawesome

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

Font Family Issue #65

Open manishbisht opened 5 years ago

manishbisht commented 5 years ago

iOS uses the PostScript name of the font. The Postscript name is changed in the Font Awesome 5.9 and the PostScript name is now FontAwesome5Free-Solid

Screen Shot 2019-08-07 at 11 16 16 AM Screen Shot 2019-08-07 at 11 16 44 AM Screen Shot 2019-08-07 at 11 18 46 AM
manishbisht commented 5 years ago

If this issue gets confirmed. I can submit the fix and send the PR.

leandrosimoes commented 5 years ago

If this issue gets confirmed. I can submit the fix and send the PR.

Hi @manishbisht ! Try to use this font files there is in the new sample/ project that I made. This files match the font family names. I changed the downlod url in the documentation, but this was not merged yet as you can see at this PR: https://github.com/entria/react-native-fontawesome/pull/64

So, would be nice if you open a new PR to change the font families, update this font files too in the sample/ project and make sure that everything is working with the new font families and files.

UPDATE: Fix font files url

sspiff commented 5 years ago

Changing the fontFamily like so is an easy workaround:

import FontAwesome, { SolidIcons } from 'react-native-fontawesome'
SolidIcons._fontFamily = 'FontAwesome5Free-Solid'
leandrosimoes commented 5 years ago

Changing the fontFamily like so is an easy workaround:

import FontAwesome, { SolidIcons } from 'react-native-fontawesome'
SolidIcons._fontFamily = 'FontAwesome5Free-Solid'

Did you try to use this font file? The files are from the sample project and the sample project was tested in both, android and ios, and it is all working.

sspiff commented 5 years ago

Changing the fontFamily like so is an easy workaround:

import FontAwesome, { SolidIcons } from 'react-native-fontawesome'
SolidIcons._fontFamily = 'FontAwesome5Free-Solid'

Did you try to use this font file? The files are from the sample project and the sample project was tested in both, android and ios, and it is all working.

No, I had followed the link to the font files in the (outdated?) README on npmjs.com (which point to fontawesome.com).

leandrosimoes commented 5 years ago

Changing the fontFamily like so is an easy workaround:

import FontAwesome, { SolidIcons } from 'react-native-fontawesome'
SolidIcons._fontFamily = 'FontAwesome5Free-Solid'

Did you try to use this font file? The files are from the sample project and the sample project was tested in both, android and ios, and it is all working.

No, I had followed the link to the font files in the (outdated?) README on npmjs.com (which point to fontawesome.com).

Yeah, the npm README is outdated, unfortunately. I'll open an Issue to update that asap. Try to use the font files from the link that I told you, I think that it will work.

vini-btc commented 5 years ago

The suggested fix will only work for the free version of the font, though. If using Pro - like I was trying to -, one will likely have to come up with a different workaround. :/