From 4ced943a4beff82f8ea36998f4e3299b7be93903 Mon Sep 17 00:00:00 2001 From: Radek Czemerys Date: Mon, 12 Oct 2020 19:29:46 +0200 Subject: [PATCH] fix: try using Roboto on OnePlus Co-Authored-By: Mo Bitar --- src/style/android_text_fix.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/style/android_text_fix.js b/src/style/android_text_fix.js index 0e7f241c..19b2516c 100644 --- a/src/style/android_text_fix.js +++ b/src/style/android_text_fix.js @@ -1,5 +1,5 @@ import React from 'react'; -import { Platform, StyleSheet, Text, TextStyle } from 'react-native'; +import { Platform, StyleSheet, Text } from 'react-native'; import SNReactNative from 'standard-notes-rn'; // This fixes this bug: https://github.com/facebook/react-native/issues/15114 @@ -29,10 +29,6 @@ import SNReactNative from 'standard-notes-rn'; // different choices for the system default font, so it's unlikely to be easy // to correctly match that. // -// What we choose to do is assume that users will choose the default system default -// font for their phones, and then try to use that when we can, using Slate on OnePlus, -// and falling back to Roboto for LG phones or Oppo phones. -// export function enableAndroidFontFix() { // Bail if this isn't an Android device @@ -53,8 +49,7 @@ export function enableAndroidFontFix() { case 'OnePlus': styles = StyleSheet.create({ androidFontFixFontFamily: { - fontFamily: 'Slate', - // fontFamily: 'Roboto', + fontFamily: 'Roboto', }, }); break; @@ -85,7 +80,7 @@ export function enableAndroidFontFix() { Text.render = function (...args) { let origin = __render.call(this, ...args); return React.cloneElement(origin, { - style: [styles.androidFontFixFontFamily, origin.props.style], + style: [origin.props.style, styles.androidFontFixFontFamily], }); }; }