File tree Expand file tree Collapse file tree
processing_render/src/render/primitive Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1061,20 +1061,21 @@ pub unsafe extern "C" fn processing_font_variation(
10611061 let font_entity = Entity :: from_bits ( font_id) ;
10621062 let axes = error:: check ( || font_variations ( font_entity) ) ;
10631063 if let Some ( axes) = axes
1064- && let Some ( axis) = axes. get ( index as usize ) {
1065- let tag_bytes = axis. tag . as_bytes ( ) ;
1066- let len = tag_bytes. len ( ) . min ( 4 ) ;
1067- unsafe {
1068- std:: ptr:: copy_nonoverlapping ( tag_bytes. as_ptr ( ) , out_tag, len) ;
1069- for i in len..4 {
1070- * out_tag. add ( i) = b' ' ;
1071- }
1072- * out_min = axis. min ;
1073- * out_max = axis. max ;
1074- * out_default = axis. default ;
1064+ && let Some ( axis) = axes. get ( index as usize )
1065+ {
1066+ let tag_bytes = axis. tag . as_bytes ( ) ;
1067+ let len = tag_bytes. len ( ) . min ( 4 ) ;
1068+ unsafe {
1069+ std:: ptr:: copy_nonoverlapping ( tag_bytes. as_ptr ( ) , out_tag, len) ;
1070+ for i in len..4 {
1071+ * out_tag. add ( i) = b' ' ;
10751072 }
1076- return true ;
1073+ * out_min = axis. min ;
1074+ * out_max = axis. max ;
1075+ * out_default = axis. default ;
10771076 }
1077+ return true ;
1078+ }
10781079 false
10791080}
10801081
Original file line number Diff line number Diff line change @@ -303,9 +303,10 @@ pub fn text_lines(
303303 let metrics = line. metrics ( ) ;
304304
305305 if let Some ( h) = params. max_h
306- && metrics. baseline + metrics. descent > h {
307- break ;
308- }
306+ && metrics. baseline + metrics. descent > h
307+ {
308+ break ;
309+ }
309310
310311 let line_y = base_y + metrics. baseline - metrics. ascent ;
311312 let line_text = & content[ line. text_range ( ) ] ;
@@ -347,9 +348,10 @@ pub fn text_glyph_rects(
347348 let metrics = line. metrics ( ) ;
348349
349350 if let Some ( h) = params. max_h
350- && metrics. baseline + metrics. descent > h {
351- break ;
352- }
351+ && metrics. baseline + metrics. descent > h
352+ {
353+ break ;
354+ }
353355
354356 for item in line. items ( ) {
355357 let PositionedLayoutItem :: GlyphRun ( glyph_run) = item else {
You can’t perform that action at this time.
0 commit comments