fontFamily cannot be overriden
See original GitHub issueIssue Description
const customTextProps = {
style: {
fontFamily: 'Nunito Sans'
}
};
setCustomText(customTextProps);
When using the Inspector, the Text component’s fontFamily still shows up as System
.
Apparently, react-native automatically prepended {fontFamily: 'System', fontSize:16, color:'#000'}
to Text’s style prop, which overrides our own custom style prop.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Overwrite font: in CSS
I thought I could use font-size: to override it, but I'm unclear as to how to set that to be whatever the browser...
Read more >CSS not overriding default font-family - BB Theme
Thanks! I am trying to style a Class selector named “charles”. The color, alignment, and font size all work fine with the following...
Read more >Override the font family and other Css styles in form
How can we override the theme styles to change the font family ,size and other styles for all k2 controls in the form....
Read more >How to override the font?
Hello, After I apply the MDB Css and javascript, all of the website's fonts are changed and I do not like that font....
Read more >font-face - CSS: Cascading Style Sheets - MDN Web Docs
Chrome Edge
@font‑face Full support. Chrome1. Toggle history Full support...
OpenType CBDT and CBLC rendering Full support. Chrome66. Toggle history Full support...
OpenType COLRv0 rendering Full...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s a version of the code from @ex3ndr that works in 2019
It does not work with current react-native: 0.62.2