diff --git a/src/hb-ft-colr.hh b/src/hb-ft-colr.hh index 039743147..4d3c2f467 100644 --- a/src/hb-ft-colr.hh +++ b/src/hb-ft-colr.hh @@ -188,7 +188,25 @@ _hb_ft_paint (FT_OpaquePaint opaque_paint, paint_funcs->pop_transform (paint_data); } break; - case FT_COLR_PAINTFORMAT_ROTATE: break; + case FT_COLR_PAINTFORMAT_ROTATE: + { + float a = paint.u.rotate.angle / 65536.f; + float cc = cosf (a * (float) M_PI); + float ss = sinf (a * (float) M_PI); + paint_funcs->push_transform (paint_data, + 1.f, 0.f, 0.f, 1.f, + -paint.u.rotate.center_x / 65536.f, + -paint.u.rotate.center_y / 65536.f); + paint_funcs->push_transform (paint_data, cc, ss, -ss, cc, 0., 0.); + paint_funcs->push_transform (paint_data, + 1.f, 0.f, 0.f, 1.f, + +paint.u.rotate.center_x / 65536.f, + +paint.u.rotate.center_y / 65536.f); + paint_recurse (paint.u.rotate.paint); + paint_funcs->pop_transform (paint_data); + paint_funcs->pop_transform (paint_data); + paint_funcs->pop_transform (paint_data); + } case FT_COLR_PAINTFORMAT_SKEW: break; case FT_COLR_PAINTFORMAT_COMPOSITE: {