diff options
Diffstat (limited to 'src/sfnt/ttcolr.c')
-rw-r--r-- | src/sfnt/ttcolr.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c index ca8a7a2da..e46ca48da 100644 --- a/src/sfnt/ttcolr.c +++ b/src/sfnt/ttcolr.c @@ -649,16 +649,29 @@ return 1; } - else if ( apaint->format == FT_COLR_PAINTFORMAT_SKEW ) + else if ( apaint->format == FT_COLR_PAINTFORMAT_SKEW || + (FT_PaintFormat_Internal)apaint->format == + FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER ) { apaint->u.skew.paint.p = child_table_p; apaint->u.skew.paint.insert_root_transform = 0; - apaint->u.skew.x_skew_angle = FT_NEXT_LONG( p ); - apaint->u.skew.y_skew_angle = FT_NEXT_LONG( p ); + apaint->u.skew.x_skew_angle = FT_NEXT_SHORT( p ) << 2; + apaint->u.skew.y_skew_angle = FT_NEXT_SHORT( p ) << 2; + + if ( (FT_PaintFormat_Internal)apaint->format == + FT_COLR_PAINTFORMAT_INTERNAL_SKEW_CENTER ) + { + apaint->u.skew.center_x = FT_NEXT_SHORT( p ) << 16; + apaint->u.skew.center_y = FT_NEXT_SHORT( p ) << 16; + } + else + { + apaint->u.skew.center_x = 0; + apaint->u.skew.center_y = 0; + } - apaint->u.skew.center_x = FT_NEXT_LONG( p ); - apaint->u.skew.center_y = FT_NEXT_LONG( p ); + apaint->format = FT_COLR_PAINTFORMAT_SKEW; return 1; } |