I am trying to setup a global custom font, what i did:
Added my .ttf file to assets/Helixa-Regular.ttf
Added assets: ['./assets'] to my react-native.config.js
Created a mapping.json file in the root of my project
{ "components": {}, "strict": { "text-font-family": "Helixa-Regular" } }
Added import { default as mapping } from './mapping.json' in my App.tsx and also added customMapping={mapping} to my ApplicationProvider
I am on react-natove 0.71.8 so no linking is needed (tried it but it didn't help)
I installed the podst, rebuild the app and i still get the Unrecognized font-family: Helixa-Regular error. When i change the value in mapping.json to something like Arial, it works.
💬 Question
I am trying to setup a global custom font, what i did:
.ttf
file toassets/
Helixa-Regular.ttf
assets: ['./assets']
to myreact-native.config.js
mapping.json
file in the root of my project{ "components": {}, "strict": { "text-font-family": "Helixa-Regular" } }
import { default as mapping } from './mapping.json'
in myApp.tsx
and also addedcustomMapping={mapping}
to myApplicationProvider
0.71.8
so no linking is needed (tried it but it didn't help)Unrecognized font-family: Helixa-Regular
error. When i change the value inmapping.json
to something likeArial
, it works.UI Kitten and Eva version