Custom Font not working on android
Quadriphobs1 opened this issue · 5 comments
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.
Are you setting fontWeight or fontStyle in your style of the text?
I'm also having this issue, I'm not setting fontWeight or fontStyle either
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
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
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.