简体   繁体   English

Flutter 何时使用 SF Pro Display 或 SF Pro Text 以及如何将它们分配给 Text 小部件?

[英]Flutter when is SF Pro Display or SF Pro Text used and how to assign them to a Text widget?

I use the following two Text widgets in my app:我在我的应用程序中使用以下两个文本小部件:

Text('12,23123,123.123 asdASD',
    style: TextStyle(
      fontFamily: '.SF UI Text',
    )),
Text('12,23123,123.123 asdASD',
    style: TextStyle(
      fontFamily: '.SF UI Display',
    ))

However, both are displayed with the same fontFamily .但是,两者都使用相同的fontFamily显示。

Flutter SF Pro 显示和文字问题

The iOS typography docs say the following: iOS 排版文档说以下内容:

For SF, use Text for text that's smaller than 20 points;对于 SF,小于 20 磅的文本使用 Text; use Display for text that's 20 points or larger.对 20 磅或更大的文本使用 Display。

https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/ https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/

How can I apply the different front families to my Text widgets?如何将不同的前端系列应用于我的文本小部件?

The related GitHub issue to this question is currently under review by the Flutter Engineers and it seems that it is still in progress atm. Flutter 工程师目前正在审查与此问题相关的 GitHub 问题,似乎仍在进行中。 Another related issue linked to this is this GitHub post , as mentioned by the Flutter team , the issue is yet to be identified.与此相关的另一个相关问题是GitHub 帖子正如 Flutter 团队所述,该问题尚未确定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM