mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-13 23:17:42 +00:00
Glyph outlines: minimal boolean form (clippy 1.96 nonminimal_bool)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2866f617a7
commit
a79351e249
1 file changed
+1
-1
@@ -64,7 +64,7 @@ pub fn text_line(db: &ScopedFonts<'_>, family: &str, style: &str, text: &str, he
|
||||
let boxed = glyphs.iter().any(|g| g.gid == 0) && db.missing_box(&face).is_some();
|
||||
for g in &glyphs {
|
||||
let outline = db.outline(&face, g.gid);
|
||||
if !outline.elements().is_empty() && !(boxed && g.gid == 0) {
|
||||
if !(outline.elements().is_empty() || (boxed && g.gid == 0)) {
|
||||
ctx.set_transform(kurbo::Affine::translate((x + g.x_offset as f64 * k, baseline - g.y_offset as f64 * k)) * kurbo::Affine::scale(k));
|
||||
ctx.fill_path(&outline);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user