Sketch text: bold and italic, text along a curve, alignment and spacing (#852)

A sketch text gets an optional style: bold and italic faces (a slanted fallback for italic), left/center/right alignment, letter and line spacing, and a path curve of the same sketch for the baseline to follow (reverse takes the other side). Edit Text gets B/I toggles, alignment, spacing fields and a Path chip, all live. The style is saved only when not plain and is noted under format 18.
This commit is contained in:
phanoob authored and GitHub committed 2026-10-13 19:27:35 -04:00
1 parent fe3717f2e4
commit dd7790a43f
21 files changed
+1082 -100

No files matched your search

+9 -1
View File
@@ -135,7 +135,15 @@ fn insert(s: &mut Session, p: &Value, cmd: &str, svg: bool) -> Result<Value> {
if let Geom2::Text { text, at, height, angle } = t {
let mut doc = (*s.doc).clone();
let mut sk = doc.sketch(id)?.clone();
if super::sketch_project::add_link(s, &doc, id, &mut sk, LinkKind::Text, LinkSource::Text { text, at, height, angle, font: None }).is_ok()
if super::sketch_project::add_link(
s,
&doc,
id,
&mut sk,
LinkKind::Text,
LinkSource::Text { text, at, height, angle, font: None, style: Default::default() },
)
.is_ok()
{
*doc.sketch_mut(id)? = sk;
*s.doc_mut() = doc;