mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-06 10:41:55 +00:00
* Gap 4: flag document fonts that aren't installed The font box (ribbon, mini toolbar, both Font dialog boxes) shows a warning mark when the current font isn't installed; its hover note names the font drawn instead. The status bar says "N fonts not installed" and lists each with the faces drawn instead, plus Add Font…. Agents get `font.missing` and `format.state.fontShownAs`. Layout records, where it picks a face per text segment, the fonts the shown text asks for that aren't installed and the faces drawn instead (ParaLayout::substituted, DocLayout::substituted_fonts), so hidden text, unused styles and orphaned stories never count; list labels, field results and East Asian and complex-script text do, and so does a missing roman font drawn in Cambria. Metric-compatible substitutes and symbol fonts drawn as Unicode aren't flagged. Bounded for hostile files: 64 pairs a paragraph, 1024 a document, names kept to 256 characters, 20 rows in the popup. Ported from alehel/wordcraft#1 onto current main; English strings only (translations belong in storytold/craft-i18n). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: missing-font review fixes - Judge a padded font name by the face layout drew for it, and skip blank names. - Name the face CJK text is drawn in for a missing East Asian font, not Cambria. - Keep the missing-fonts list per window, so several windows don't rebuild it every frame. - Expose the font box's warning to screen readers as its description. - Count missing fonts with craft-i18n plurals (`i18n::tn`). - One table of metric twins (`fonts::word::METRIC_TWINS`): a missing font is drawn in an installed twin first, and the warning reads the same table. - Find the status-bar item by part of its label in the click test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: warn for a font picked at the caret; drop fonts of hidden list items - At a collapsed caret the font box warns for a missing font typing will use, also at the end of text in another font (it waited for the first letter). - A list item that shows nothing (#3982) reports no missing font: its number was shaped, and its font recorded, before layout dropped it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: say where Add Font… is, and that it needs the font file The font box's note said "Add Font… installs it": Add Font… opens a file picker at the end of the list, so it only helps with a font file at hand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: docs say the popup lists 20, and when the font box warns ahead CodeRabbit review: the status-bar popup lists the first 20 missing fonts, then a count; the font box also warns at a collapsed caret for a font no shown text uses yet; `fontShownAs` is the font's substitute, fallback faces aside. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: the Font dialog warns for a missing font over a selection CodeRabbit review: the dialog's boxes show the fonts OK applies, which no shown text may use yet (an Asian text font over Latin text, a font typed into the dialog), so they name the substitute whatever is selected. The ribbon's box over a selection still reads the list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: the Asian font box names the face CJK text gets CodeRabbit review: the status bar's list is by font name, so for a font Latin text also uses it named the Latin text's substitute. The Asian text box now always looks up the face layout draws Chinese, Japanese and Korean text in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: gaps.md status on the current line, missing-font scope and twin wording Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: gaps.md says which missing fonts are flagged and what font.missing lists Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Gap 4: font.missing lists what the current view lays out Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>