react-native-fonts
react-native-fonts copied to clipboard
San Francisco is not a system font?
Hey,
First of all, thanks for putting this together.
I have issues with the San Francisco font on my iPhone 6 emulator, iOS 10.3. Expo claims that it is not a system font, and must be loaded through Expo.Font.loadAsync ?
Testing some other fonts, it works fine - Arial, Avenir etc., but I consitently get the error on San Fransisco (and on the font mentioned in usage example, too - "Iowan Old Style").
Any idea why?
You need to use fontFamily: 'system font'
instead.
I found out, actually, but totally forgot I raised this issue - sorry! :)
It's just "System", by the way :) I don't know how to use "Iowan Old Style", though?
This issue might be more about updating the docs to reflect this, rather than the font 'not working'. Also, the question is raised how this would work cross platform? Now I'm assigning "System" font for all my text while creating the iOS app - will this mean that the Android app will have the "Roboto" font all these places?
@jhalborg Have you figured out how to choose between Display and Text variants of SF font?
I just use fontFamily: 'System' and style it from there @pavloko
How to set "System font" for WebView?
@trungtrungkang You'd use something like font-family: -apple-system;
Does anyone have a solution for this?
The system font on iOS for Thai is Thonburi. Setting it to system
does not load San Francisco.
Not loading font using System or system..
Hi,
using fontFamily: 'system font'
doesn't seem to be working, are there any other solutions?
Never mind, I just loaded it through font.async,
here's the docs if anyone is interested https://docs.expo.dev/versions/latest/sdk/font/