mirror of
https://github.com/typst/typst
synced 2025-08-20 09:49:02 +08:00
Move glyph reset to stretch function
This commit is contained in:
parent
3f9f742368
commit
b00c64ccc2
@ -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 {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user