File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,16 +123,12 @@ impl ParsedFont for HarfrustFont {
123123 cursor_y += position. y_advance as f32 ;
124124 }
125125
126- let font = self . skrifa_font ( ) ?;
127- let metrics = font. metrics ( Size :: new ( size_px) , LocationRef :: default ( ) ) ;
128- let min_y = ( -metrics. ascent ) . floor ( ) as i32 ;
129- let max_y = ( -metrics. descent ) . ceil ( ) as i32 ;
130- let max_y = if max_y > min_y {
131- max_y
132- } else {
133- size_px. ceil ( ) as i32
134- } ;
135- let width = ( cursor_x * scale) . ceil ( ) . max ( 0.0 ) as i32 ;
126+ let font = self . skrifa_font ( ) ?;
127+ let metrics = font. metrics ( Size :: new ( size_px) , LocationRef :: default ( ) ) ;
128+ let min_y = ( -metrics. ascent ) . floor ( ) as i32 ;
129+ let descent_y = ( -metrics. descent ) . ceil ( ) as i32 ;
130+ let max_y = if descent_y > min_y { descent_y } else { size_px. ceil ( ) as i32 } ;
131+ let width = ( cursor_x * scale) . ceil ( ) . max ( 0.0 ) as i32 ;
136132
137133 Ok ( ShapedRun {
138134 glyphs,
You can’t perform that action at this time.
0 commit comments