M7: say what a default font family in files does and doesn't promise

Review: a saved family renders only where that family is available. The
docs and the test's comment now say the variable changes only what new
text starts in, and that a file keeps its fonts in a build with another
default, falling back like any missing family elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Salah1St
2026-10-23 17:34:43 +07:00
co-authored by Claude Opus 5.5
parent b649035695
commit c4be9c1a34
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -797,7 +797,7 @@ mod case_tests {
assert_eq!(DEFAULT_FONT, named.unwrap_or("Inter"));
let st = TextStyle::default();
assert_eq!(st.font_family, DEFAULT_FONT);
// The family is always written, so a saved file opens in the same font in any build.
// The family is always written, so a saved file keeps it in a build with another default.
let saved = serde_json::to_value(&st).unwrap();
assert_eq!(saved["font_family"], DEFAULT_FONT);
}
+4 -2
View File
@@ -79,8 +79,10 @@ other fonts) or one its users have installed:
FIGCRAFT_DEFAULT_FONT="Noto Sans Thai" cargo build --release -p figcraft
```
Files record each text's family, so they open in the same font in any build. The release workflow
leaves it unset.
Files record each text's family, so the variable only changes what new text starts in: a file
saved by one build keeps its fonts in a build with another default. Like any other family, it
renders only where it is available (embedded or installed); elsewhere the text falls back to the
faces that are. The release workflow leaves it unset.
## What gets built