如果有使用多种字体怎么办呢?

来源:6-14 如何自定义字体?

chv

2019-08-10

fonts:
- family: Rubik-Light
fonts:
- asset: fonts/Rubik-Light.ttf

写回答

1回答

CrazyCodeBoy

2019-08-12

fonts节点下直接添加就行例如:
flutter:
  fonts:
    - family: Raleway
      fonts:
        - asset: assets/fonts/Raleway-Regular.ttf
        - asset: assets/fonts/Raleway-Medium.ttf
          weight: 500
        - asset: assets/fonts/Raleway-SemiBold.ttf
          weight: 600
    - family: AbrilFatface
      fonts:
        - asset: assets/fonts/abrilfatface/AbrilFatface-Regular.ttf

1
2
慕用2365530
怎么选择具体的字体呢?比如想用 Raleway-Medium 字体呢?
2022-09-14
共2条回复

Flutter从入门到进阶 实战携程网App 一网打尽核心技术

解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。

4788 学习 · 3270 问题

查看课程