Ala*_*an2 2 xamarin.ios xamarin xamarin.forms ios11
我的 CSS 样式表似乎工作正常,但我无法将字体更改为与 iOS 11 中使用的系统字体非常匹配的字体。这是我尝试过的:
body, html {
color: red;
font-family: 'San Francisco';
};
Run Code Online (Sandbox Code Playgroud)
字符颜色为红色,但字体不变。
如何在 Xamarin.Forms iOS 中指定与 Apple 系统字体非常相似的字体?
可以通过以下方式检索系统字体系列名称:
UIFont.PreferredBody.FamilyName
Run Code Online (Sandbox Code Playgroud)
在 iOS 11 上它是:
.SF UI Text
Run Code Online (Sandbox Code Playgroud)
老套:
<font face='.SF UI Text'>This is the iOS System Font: San Francisco</font>
Run Code Online (Sandbox Code Playgroud)
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>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1688 次 |
最近记录: |