My CSS style sheet appears to be working fine but I'm not able to change the font to one that closely matches the System font used in iOS 11. Here is what I tried:
body, html {
color: red;
font-family: 'San Francisco';
};
The characters color is Red but font doesn't change.
How can I specify a font that closely resembles the Apple System Font in my Xamarin.Forms iOS?
The system font family name can be retrieved via:
UIFont.PreferredBody.FamilyName
And on iOS 11 it is:
.SF UI Text
Old school:
<font face='.SF UI Text'>This is the iOS System Font: San Francisco</font>
HTML/CSS:
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
body {
font-family: '.SF UI Text';
font-size: 60pt;
}
</style>
</head>
<body>
This is the iOS System Font: San Francisco
</body>
</html>
来源:https://stackoverflow.com/questions/46968283/is-there-a-way-i-can-use-the-apple-san-francisco-in-a-webview