0

我正在使用 unicode 字符,但我想控制它们在不同平台上的显示方式。我希望它们在任何平台上看起来都一样。有没有办法做到这一点?我希望它们看起来像第一张图片(我不希望显示表情符号)。

我正在绘制文本的代码在这里:

  final ui.ParagraphBuilder paragraphBuilder = ui.ParagraphBuilder(
  ui.ParagraphStyle(
    fontSize: 14,
    fontFamily: 'Poppins-Regular',
    fontStyle: FontStyle.normal,
    fontWeight: FontWeight.normal,
    textAlign: TextAlign.start,
  ),
)..addText(text);
final ui.Paragraph paragraph = paragraphBuilder.build()
  ..layout(ui.ParagraphConstraints(width: 20));
canvas.drawParagraph(paragraph, offset);

这就是我希望他们看起来的样子 这就是它们在 iOS 中的外观 这就是他们在 Android 上的样子

4

0 回答 0