File tree 1 file changed +6
-7
lines changed
profile-universal/src/checks
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -226,20 +226,19 @@ fn flatten_component(
226
226
let glyph = glyphs
227
227
. get ( & GlyphId :: from ( component. glyph ) )
228
228
. ok_or ( "glyph not found" ) ?;
229
+ let my_transform = to_kurbo_transform ( & component. transform , & component. anchor ) ;
230
+
229
231
Ok ( match glyph {
230
232
WriteGlyph :: Empty => vec ! [ ] ,
231
- WriteGlyph :: Simple ( _) => vec ! [ (
232
- component. glyph. into( ) ,
233
- to_kurbo_transform( & component. transform, & component. anchor) ,
234
- ) ] ,
233
+ WriteGlyph :: Simple ( _) => {
234
+ vec ! [ ( component. glyph. into( ) , my_transform) ]
235
+ }
235
236
WriteGlyph :: Composite ( composite_glyph) => {
236
237
let mut all_flattened_components = vec ! [ ] ;
237
238
for component in composite_glyph. components ( ) {
238
239
all_flattened_components. extend ( flatten_component ( glyphs, component) ?. iter ( ) . map (
239
240
|( gid, transform) | {
240
- let new_transform =
241
- to_kurbo_transform ( & component. transform , & component. anchor )
242
- * * transform;
241
+ let new_transform = my_transform * * transform;
243
242
( * gid, new_transform)
244
243
} ,
245
244
) ) ;
You can’t perform that action at this time.
0 commit comments