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
Set Roboto as the default font family for Android #2244
Conversation
this.getStartupThemes(); | ||
this.getAppCredentials(); | ||
} | ||
|
||
setFontFamily = () => { | ||
// Set a global font for Android | ||
if (Platform.OS === 'android') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to do this from Android's styles.xml?
https://stackoverflow.com/questions/16404820/how-to-set-default-font-family-for-entire-android-app
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following this https://medium.com/react-native-training/react-native-custom-fonts-ccc9aacf9e5e and somehow it gives me more confidence that is going to use the right font
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me on both of those
@sudheerDev How can I use this? |
Summary
In some Android devices (OnePlus and Oppo) the text is sometimes being cut-off and according to facebook/react-native#15114 switching the default font to use Roboto fixes the issue
This is a great candidate to build the PR and have the reporter download the apk and test it.
Fixes: #2009
Ticket Link
https://mattermost.atlassian.net/browse/MM-11845
Device Information
This PR was tested on: Android Pie, Oreo and Nougat