【发布时间】:2019-04-12 16:51:47
【问题描述】:
假设我在 pubspec.yaml 文件中添加了以下几行 字体:
fonts:
- family: GreatVibes
fonts:
- asset: fonts/GreatVibes-Regular.ttf
- asset: fonts/GreatVibes-Bold.ttf
我通过以下代码行在我的应用程序中使用它。
new Text('My New Font',
style: new TextStyle(
color: Colors.white,
fontFamily: 'GreatVibes',
fontSize: 16.0,
)),
我的问题是,在前面提供的两个 .ttf 文件中,flutter 是如何决定使用哪个文件的?
假设 Flutter 决定使用 GreatVibes-Bold.ttf,我该怎么做才能让它使用 GreatVibes-regular.ttf
【问题讨论】:
标签: flutter flutter-layout flutter-dependencies