feat: sketch text takes a font, an installed family or a font file (#516)

sketch.text and sketch.edit_text take an optional font: an installed family or a .ttf/.otf/.ttc file. Edit Text gets a Font field. The font is kept with the text under format 16; no fonts are bundled, and the font search is bounded.

Fixes #513

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NOWN-DEVandClaude Opus 5.5 authored and GitHub committed 2026-10-13 02:04:59 -04:00
1 parent 7d00df0a3f
commit a69c2928f0
15 files changed
+883 -41

No files matched your search

+4 -1
View File
@@ -71,13 +71,16 @@ pub enum LinkSource {
Iso { body: String, at: Vec3, dir: String },
/// The outline of a body spun about an axis (world line), laid into the sketch plane.
Spun { body: String, origin: Vec3, dir: Vec3 },
/// Text: baseline start `at` (sketch coordinates), capital height and angle (radians).
/// Text: baseline start `at` (sketch coordinates), capital height and angle (radians), in
/// `font` (a font file path or an installed family name; none: the built-in font).
Text {
text: String,
at: Vec2,
height: f64,
#[serde(default)]
angle: f64,
#[serde(default, skip_serializing_if = "Option::is_none")]
font: Option<String>,
},
}