Open crisfcodes opened 3 years ago
@cristian05
Did you try to apply the custom font to the usual Text
component with fontWeight: "normal"
or fontWeight: "bold"
?
We had a similar issue https://github.com/akveo/react-native-ui-kitten/issues/1399 so it might be just related to font/react-native.
@malashkevich
Yes I did, fontWeight: "normal"
works, the problem is, are only being loaded medium
and regular
weights. Semibold
and Bold
are missing. neither the console or expo shown any error.
π Bug Report
I have created an
react-native/typescript
app withexpo CLI
, this generate some base code, inlcudinghooks/useCachedResources
to load any resources or data that we need prior to rendering the app, in my case in this hook I load custom fonts(in particular Inter Display Font). I'm experimenting some problems because the app loads only two weights:regular and medium
, If I try to usesemi-bold
orbold
this doesnt work and use the san serif font that comes by default.Additional data:
fontFamily "MyFontFamily" is not a system font and has not been loaded through Font.loadAsync.
This is not the case.Advanced Configuration
and change some especific styles.fontWeight: normal
or any of the weights but nothing works.useCachedResources hook
This come by default with
expo init my-app
.Consuming the hook in App.tsx
mapping.json: specific UI-Kitten configuration to change font style
I can think that the problem comes from here but the thing is, if there was a problem loading the fonts, either expo would have already thrown an error or the other fonts weights(regular/medium) would not load.
The problem
I have no idea if the problem comes from
expo
,ui kitten
or ifinter
font can't be loaded by react native by some other reason.To Reproduce
expo init my-app
and add UI kitten as dependency.App
component wrap the navigation withApplicationProvider
like so:Expected behavior
If two typography weights are loaded correctly, why are the other two weights are not loaded? all sizes are expected to load and be usable as normal throughout the app. I don't know if the problem comes from
expo
, although I don't think this is the problem because then the other two sizes wouldn't load, or the problem is caused by UI Kitten.Link to runnable example or repository (highly encouraged)
UI Kitten and Eva version
Environment information