Repository navigation
fix(appearance): resolve Linux code fonts under CJK locales - #1305
Merged
Merged
Conversation
|
This pull request now follows CONTRIBUTING.md. Thanks! 这个 PR 现在符合 CONTRIBUTING.md 了,谢谢! |
…ts as the menu opens - A family installed but not loadable (in a font collection, not its first face) is drawn by its own name, as before, instead of left out: codeFontFiles now tells whether each family is installed besides its files. - Only the families set and the fallbacks are loaded before the first frame; the Appearance menu's presets are loaded as the menu opens, not at every start. - The root cause is noted: Skia's Fontconfig StyleSet::matchStyle picks among an alias's faces without the family, fixed in Skia a4d18ba482 (flutter/flutter#195102); this can go with a Flutter that has it. Co-Authored-By: BaoCode <noreply@baocode.dev>
kun6687
force-pushed
the
fix/linux-code-font-fallback
branch
from
November 25, 2026 06:09
d3fc78b to
aed1932
Compare
Collaborator
|
Thanks for the fix and the clear write-up! I pushed a few changes on top, and rebased the branch onto
Since the shape of the native answer changed, could you build it on your Linux machine once more and check that Consolas → Courier New under |
Collaborator
|
Merged, thanks! If your Linux build of |
This was referenced Nov 25, 2026
leookun
added a commit
that referenced
this pull request
Nov 25, 2026
…1306) g_steal_pointer() gives a gpointer in C++ there, which fl_value_set_string_take() does not take: the Linux release builds failed at my_application.cc:297 since #1305. The list is now a plain pointer, taken by its entry. Co-authored-by: leo <leokuncn@gmail.com> Co-authored-by: BaoCode <noreply@baocode.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #1304
What and why / 改了什么、为什么
Linux 使用
zh_CN.UTF-8且未设置FC_LANG时,Flutter/Skia 可能把已安装的代码字体解析成其他字形,编辑器和终端也可能落到比例字体。FC_LANG。此实现只加载字体集合的第一个字面;任意自定义字体的热切换未做桌面验收。How it was tested / 怎么测的
dart format、改动文件的flutter analyze --no-pub和git diff --check均通过。flutter test --no-pub test/theme/linux_code_fonts_test.dart test/theme/code_font_test.dart:12 项通过。flutter build linux --release --no-pub:构建成功。实际运行 Linux x64 Release,在LANG=zh_CN.UTF-8、LANGUAGE=zh_CN:zh、无FC_LANG的环境,从外观页将 Consolas 切换到 Courier New。对照字形确认外观预览、已打开的编辑器和终端均在不重启的情况下更新,设置也成功保存。Checklist / 检查
accepted。