mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-29 21:06:50 -06:00
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:
co-authored by
Claude Opus 5.5
parent
b649035695
commit
c4be9c1a34
@@ -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
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user