mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-29 18:52:15 +01:00
Layer names (and any other UI text) in scripts the bundled Inter lacks showed missing-glyph boxes even when the canvas found a fallback font. The lazy UI loader only knew CJK plus a short hard-coded list of Thai font paths, so any other script, or a Thai font at another path, never got a fallback. photocraft_text::scripts classifies 20 scripts and picks candidate files by name (Noto, Windows, macOS and common Linux families) from a listing of the platform font directories, made once per process on first need. The UI loader tries a script once when one of its characters is missing, reads at most a few candidates, and registers the first face whose cmap really maps the character. Latin text loads nothing; the web build has no candidates and does nothing. Co-authored-by: Fabio Lussi <198260595+itrycodinganditsbad@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>