From 98ebc339b4193aedcdc133eb452bc942c866954b Mon Sep 17 00:00:00 2001 From: nosamu <71368227+n0samu@users.noreply.github.com> Date: Sun, 17 Dec 2023 20:58:36 -0600 Subject: [PATCH] core: Use i32 for font ascent and descent --- core/src/font.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/font.rs b/core/src/font.rs index 57cb88b55..d43953773 100644 --- a/core/src/font.rs +++ b/core/src/font.rs @@ -177,11 +177,11 @@ struct FontData { /// The distance from the top of each glyph to the baseline of the font, in /// EM-square coordinates. - ascent: i16, + ascent: i32, /// The distance from the baseline of the font to the bottom of each glyph, /// in EM-square coordinates. - descent: i16, + descent: i32, /// The distance between the bottom of any one glyph and the top of /// another, in EM-square coordinates. @@ -206,7 +206,7 @@ impl<'gc> Font<'gc> { let descriptor = FontDescriptor::from_swf_tag(&tag, encoding); let (ascent, descent, leading) = if let Some(layout) = &tag.layout { - (layout.ascent as i16, layout.descent as i16, layout.leading) + (layout.ascent as i32, layout.descent as i32, layout.leading) } else { (0, 0, 0) };