首页 > 解决方案 > 谷歌字体,而粗体不会在 Flutter 应用程序中为 NumberFormat 呈现空格

问题描述

我有一个问题,当加粗时,数千之间的空格不会用 Lato(和其他一些字体)呈现。

在此处输入图像描述

您可以看到每组三个零之间的空格,这是我想要的,但它们不会为其他行渲染。

我的字体配置是:

  fonts:
    - family: SourceSansPro
      fonts:
        - asset: fonts/SourceSansPro-Regular.ttf
        - asset: fonts/SourceSansPro-Bold.ttf
          weight: 700
    - family: PublicSansBlack
      fonts:
        - asset: fonts/PublicSans-Black.ttf
    - family: RobotoSlab
      fonts:
        - asset: fonts/RobotoSlab-Regular.ttf
          weight: 400
        - asset: fonts/RobotoSlab-Medium.ttf
          weight: 500
    - family: Lato
      fonts:
        - asset: fonts/Lato-Regular.ttf
        - asset: fonts/Lato-Bold.ttf
          weight: 700

奇怪的是,PublicSansBlock当权重是FontWeight.normal而不是其他时,它呈现正确。它与我只加载一个重量的字体源相同。这可能是一个错误TextStyle吗?

该值是100 000 000通过格式化的,new NumberFormat('###,###,###,###', 'fr')但我怀疑它与此无关,因为我看到它适用于另一种字体且非粗体。

标签: fluttergoogle-fonts

解决方案


推荐阅读