Move glyph reset to stretch function

This commit is contained in:
mkorje 2025-06-01 16:18:54 +10:00
parent 3f9f742368
commit b00c64ccc2
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -448,6 +448,8 @@ impl GlyphFragment {
short_fall: Abs,
axis: Axis,
) {
self.reset_glyph();
// If the base glyph is good enough, use it.
let mut advance = self.size.get(axis);
if axis == Axis::X && !self.extended_shape {

View File

@ -60,8 +60,6 @@ pub fn stretch_fragment(
}
};
glyph.reset_glyph();
let relative_to_size = relative_to.unwrap_or_else(|| size.get(stretch_axis));
glyph.stretch(ctx, stretch.relative_to(relative_to_size), short_fall, stretch_axis);