Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Font not working on android #1

Open
Quadriphobs1 opened this issue Aug 23, 2017 · 5 comments
Open

Custom Font not working on android #1

Quadriphobs1 opened this issue Aug 23, 2017 · 5 comments

Comments

@Quadriphobs1
Copy link

I just installed this and all went well, i linked the custom font and its appear in the appropriate folder but whenever i launch the application i don't see my custom font working at all, i am using native base with react native and using react native router flux.

I don't seems to know what is wrong here i am using android emulator 22, any help please on this, i don't get any error when i launch the application though.

@cmendes0101
Copy link

Are you setting fontWeight or fontStyle in your style of the text?

@lagosnomad
Copy link

I'm also having this issue, I'm not setting fontWeight or fontStyle either

@cmendes0101
Copy link

Bummer, yah that was my issue. For iOS i had fontWeight and fontStyle and that broke it for Android.

Using this package to set a default fontFamily but to also cleanup fontWeight and fontStyle with these changes: https://github.com/cmendes0101/react-native-global-font/blob/master/index.js

Not sure if its PR worthy since my use case. Maybe give this a shot incase something in inheriting font styles: yarn add github:cmendes0101/react-native-global-font

@cmendes0101
Copy link

also Android is a little more sensitive about font names. What font are you trying? If it's a multi file font family then you have to declare the fontFamily file specifically like Nunito-Regular and not Nunito

@lagosnomad
Copy link

Yea, I'm using the Brandon-Grotesque font, it's a multi file font family and i'm declaring the font family as BrandonGrotesque-Regular.

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

No branches or pull requests

3 participants