0

I have installed many fonts..and all are working fine, but not the NOTO-Fonts. I've created an easy code, to show you the problem. Licorice-Regular and GeoAcadNusxNormal are shown very nicely on iOS and android. But NOTO-Fonts are only showing as standard font. I've installed all fonts the same way. And all fonts are in the right folders in Android and Xcode. I can see the correct Symbols of NOTO-Fonts in Xcode very nicely.

const App = () => {
  return (
    <View
      style={{
        flex: 1,
        justifyContent: "center",
        alignItems: "center",
        backgroundColor: "white"
      }}>
      <Text>Hello, world!</Text>
      <Text style={{ fontFamily: 'Licorice-Regular', fontSize: 40 }}>
        Google-Font fine on ios and android (Simulator and real device)
      </Text>
      <Text style={{ fontFamily: 'GeoAcadNusxNormal', fontSize: 40 }}>
        Custom-Font fine on ios and android
      </Text>
      <Text style={{ fontFamily: 'NotoSansGeorgian-Medium' }}>
        NOTO-Font doesn't work. Is shown as standart Font, but not georgian.
      </Text>
      <Text style={{ fontFamily: 'NotoSansTamil-Regular' }}>
        NOTO-Font doesn't work. Is shown as standart Font, but not Tamil.
      </Text>
    </View>
  )
}

My react-native.config.js looks like this:

module.exports = {
    project: {
        ios: {},
        android: {},
    },
    assets: ['./src/assets/fonts/'],
};

And here is my package.json

{
  "name": "Test",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "react": "17.0.2",
    "react-localization": "^1.0.17",
    "react-native": "0.66.4",
    "react-native-mmkv": "^1.5.4",
    "react-native-reanimated": "^2.3.1"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "7.14.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.66.2",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}
Ruli
  • 2,592
  • 12
  • 30
  • 40
Cris
  • 1
  • 2

1 Answers1

0

I've found a solution:

When I use GeoAcadNusxNormal-custom-font when I use "a" in the code. And "ა" is shown on the app-display. This was fine for me. But with NOTO-Fonts wenn I use "a", I see "a" on the display and I was irritated, as you see above. Well, now I installed the georgian font on my Computer and in my code I tried now the georgian font "ა" instead fo "a" and the app-display now show a correct georgian ა.

I'm not sure, if I did all fine, but now it works. On an newly device the georgian fonts are also shown correctly in the Noto-Georgian-font.

<Text style={{ fontFamily: 'NotoSansGeorgian-Regular', fontSize: 40 }}>ზტლწოაჯ</Text>

Greetings!

Cris
  • 1
  • 2