feat: shape and antialias Tessera text with system fonts
Verify Tessera GUI / verify (push) Successful in 13m28s

This commit is contained in:
2026-10-20 14:25:28 +08:00
parent 1f64de48b9
commit f0fae1792f
19 changed files with 661 additions and 95 deletions
+4 -2
View File
@@ -3,6 +3,7 @@ use anyhow::{Result, bail};
use crate::{
document::{Frame, RenderCommand},
text::{self, TextStyle},
ui_bridge::{MAX_DIMENSION, UiKind, UiNode},
};
@@ -50,9 +51,10 @@ fn layout(
size: *size,
color: color.clone(),
});
let measured = text::measure(value, TextStyle::ui(*size));
Size {
width: value.chars().count() as f32 * 8.0 * *size as f32,
height: 8.0 * *size as f32,
width: measured.width,
height: measured.height,
}
}
UiKind::Rect {