react-native-fonts icon indicating copy to clipboard operation
react-native-fonts copied to clipboard

San Francisco is not a system font?

Open jhalborg opened this issue 7 years ago • 10 comments

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 ?

screen shot 2017-05-21 at 13 10 22

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?

jhalborg avatar May 21 '17 11:05 jhalborg

You need to use fontFamily: 'system font' instead.

Jacse avatar May 30 '17 15:05 Jacse

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 avatar May 31 '17 06:05 jhalborg

@jhalborg Have you figured out how to choose between Display and Text variants of SF font?

pavloko avatar Sep 11 '17 13:09 pavloko

I just use fontFamily: 'System' and style it from there @pavloko

jhalborg avatar Sep 11 '17 13:09 jhalborg

How to set "System font" for WebView?

trungtrungkang avatar Oct 06 '17 09:10 trungtrungkang

@trungtrungkang You'd use something like font-family: -apple-system;

blakek avatar Oct 09 '17 16:10 blakek

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.

SimonVillage avatar Aug 20 '20 09:08 SimonVillage

Not loading font using System or system..

thorep avatar May 30 '21 21:05 thorep

Hi, using fontFamily: 'system font' doesn't seem to be working, are there any other solutions?

etherealsunshine avatar Aug 25 '21 06:08 etherealsunshine

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/

etherealsunshine avatar Sep 04 '21 05:09 etherealsunshine