【问题标题】:how to change Font dots mode in flutter?如何在 flutter 中更改字体点模式?
【发布时间】:2023-01-10 16:57:09
【问题描述】:

我是 flutter 的开发者

我有一个可变字体,我想在我的项目中使用它,但我不能使用其中的一个选项。此选项更改阿拉伯语中点的状态。

如果谁有解决办法,请告诉我,谢谢

我使用了 DefaultTextStyle 和 FontFeature,但没有用。 我没有看到更改点模式的属性this is dots mode in my variable font

【问题讨论】:

    标签: flutter dart variable-fonts


    【解决方案1】:

    请检查以下小部件:

    class Bullet extends Text {
      const Bullet(
        String data, {
        Key key,
        TextStyle style,
        TextAlign textAlign,
        TextDirection textDirection,
        Locale locale,
        bool softWrap,
        TextOverflow overflow,
        double textScaleFactor,
        int maxLines,
        String semanticsLabel,
      }) : super(
              '• ${data}',
              key: key,
              style: style,
              textAlign: textAlign,
              textDirection: textDirection,
              locale: locale,
              softWrap: softWrap,
              overflow: overflow,
              textScaleFactor: textScaleFactor,
              maxLines: maxLines,
              semanticsLabel: semanticsLabel,
            );
    }
    

    对于字符串,您可以使用 UTF 代码

     String bullet = "u2022 "
    

    所以他们直接为你生成子弹

    【讨论】:

      猜你喜欢
      • 2020-05-17
      • 2019-11-23
      • 2021-04-06
      • 2019-12-06
      • 2019-07-29
      • 1970-01-01
      • 2023-03-05
      • 2011-11-22
      • 2020-06-29
      相关资源
      最近更新 更多