mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-31 14:17:12 -06:00
- Load each fallback font file once: the region-merged Noto Sans CJK .ttc found for Han also covers Hangul (and Tahoma covers Thai and Hebrew), so a later script whose candidate file is already loaded reuses it instead of loading tens of MB again. New test: no two fallback faces share a file. - Fold in the Linux CJK paths from #103: Fedora google-noto-cjk/, Arch noto-cjk/ and wenquanyi/, Debian truetype/wqy/wqy-microhei.ttc, the SC .otf builds, /usr/local, plus SimSun on Windows. Document the .ttc face indices (JP 0, KR 1, SC 2, TC 3, HK 4); Hangul uses the KR face. - macOS: Hiragino Sans (ヒラギノ角ゴシック W3) and Hiragino Sans GB come before PingFang.ttc, which recent macOS no longer ships in /System. - Comments promise glyphs instead of tofu, not correct rendering. - fallback_covers_its_script compared has_glyphs, which is a false negative when the owning face also draws the replacement glyph (DejaVu Sans as UI font owns Hebrew); compare laid-out glyphs with the tofu glyph instead. Co-authored-by: eyouhi <47080137+eyouhi@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>