Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion sparse_strips/vello_common/src/glyph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,18 @@ impl<'a, T: GlyphRenderer + 'a> GlyphRunBuilder<'a, T> {
local_transform *= glyph_transform;
}

// When hinting, ensure the y-offset is integer. The x-offset doesn't matter, as we
// perform vertical-only hinting.
let mut total_transform = (transform * local_transform).as_coeffs();
if hinting_instance.is_some() {
total_transform[5] = total_transform[5].round();
}

render_glyph(
self.renderer,
PreparedGlyph::Outline(OutlineGlyph {
path: &path.0,
transform: transform * local_transform,
transform: Affine::new(total_transform),
}),
);
}
Expand Down
4 changes: 2 additions & 2 deletions sparse_strips/vello_cpu/snapshots/glyphs_scaled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.