Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 中文显示问题 #55

Open
dickens7 opened this issue Jan 18, 2022 · 0 comments
Open

Ubuntu 中文显示问题 #55

dickens7 opened this issue Jan 18, 2022 · 0 comments

Comments

@dickens7
Copy link

声明自定义字体 Roboto, Flutter 在 Linux 先默认使用的是 Roboto 字体

pubspec.yaml

...
  fonts:
    - family: Roboto
      fonts:
        - asset: assets/fonts/DroidSansFallbackFull.ttf
...
  • 使用自定义字体后仍有部分,中文显示不正常。

image

此处的 翻译 清空 按钮以及 placeholder 仍然为乱码 debug 发现这里使用的字体为 .SF Pro Text

pubspec.yaml

...
  fonts:
    - family: Roboto
      fonts:
        - asset: assets/fonts/DroidSansFallbackFull.ttf
    - family: .SF Pro Text
      fonts:
        - asset: assets/fonts/DroidSansFallbackFull.ttf 
...

零时增加字体可以解决。

image

  • 这时设置的 CustomAppBar.title 仍然有问题

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant