Skip to content

Add platform specific handling of font files#37

Open
noinfo wants to merge 1 commit into
entria:masterfrom
noinfo:master
Open

Add platform specific handling of font files#37
noinfo wants to merge 1 commit into
entria:masterfrom
noinfo:master

Conversation

@noinfo

@noinfo noinfo commented Jun 7, 2018

Copy link
Copy Markdown

Makes webfonts work in iOS and Android besides having to use different names in 'CSS' style.

Comment thread Icon.js
}
}

const fontFamily = Platform.OS === 'ios' ? 'FontAwesome' : 'fontawesome-webfont';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we have the same FontAwesome name in both ios and android?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does not seem to work since iOS uses the Font Name and Android uses the filenames. The pull requests amends this so that you can simply copy the files from the FontAwesome4.7.0 Zip. Even renaming does not work for Android as font names should be all lowercase.

I don't know if that is a recent change, but otherwise it won't work for my react native 0.55.4 projects.

@jgcmarins jgcmarins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

@sibelius

sibelius commented Jun 7, 2018

Copy link
Copy Markdown
Member

Can we make the user pass this as a prop instead? Having the default as the old value?

@noinfo

noinfo commented Jun 7, 2018 via email

Copy link
Copy Markdown
Author

@sibelius

sibelius commented Aug 1, 2019

Copy link
Copy Markdown
Member

check if this helps #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants