Created
February 1, 2019 10:48
-
-
Save daniloercoli/14b811c39eb74abfe9ca0b6d2ba2c5e4 to your computer and use it in GitHub Desktop.
Platform dependant font family selection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/editor/src/components/post-title/index.native.js b/packages/editor/src/components/post-title/index.native.js | |
index ceff32241..4b70ba833 100644 | |
--- a/packages/editor/src/components/post-title/index.native.js | |
+++ b/packages/editor/src/components/post-title/index.native.js | |
@@ -1,3 +1,8 @@ | |
+/** | |
+ * External dependencies | |
+ */ | |
+import { Platform } from 'react-native'; | |
+ | |
/** | |
* WordPress dependencies | |
*/ | |
@@ -54,7 +59,7 @@ class PostTitle extends Component { | |
style={ [ style, { | |
minHeight: Math.max( minHeight, this.state.aztecHeight ), | |
} ] } | |
- fontFamily={ 'serif' } | |
+ fontFamily={ Platform.OS === 'ios' ? 'NotoSerif' : 'serif' } | |
fontSize={ 24 } | |
fontWeight={ 'bold' } | |
onChange={ ( event ) => { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment