diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 26f4a83..e4f1abf 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -1905,12 +1905,12 @@ _cairo_ft_scaled_glyph_init (void *abstract_font, if (unscaled->x_scale == 0) x_factor = 0; else - x_factor = 1 / unscaled->x_scale; + x_factor = 1 / unscaled->x_scale * scaled_font->base.ctm.xx; if (unscaled->y_scale == 0) y_factor = 0; else - y_factor = 1 / unscaled->y_scale; + y_factor = 1 / unscaled->y_scale * scaled_font->base.ctm.yy; /* * Note: Y coordinates of the horizontal bearing need to be negated. @@ -1961,7 +1961,7 @@ _cairo_ft_scaled_glyph_init (void *abstract_font, fs_metrics.x_advance = 0; fs_metrics.y_advance = DOUBLE_FROM_26_6 (advance) * y_factor; } - } else { + } else { fs_metrics.width = DOUBLE_FROM_26_6 (metrics->width) * x_factor; fs_metrics.height = DOUBLE_FROM_26_6 (metrics->height) * y_factor; @@ -1984,7 +1984,7 @@ _cairo_ft_scaled_glyph_init (void *abstract_font, else fs_metrics.y_advance = DOUBLE_FROM_16_16 (glyph->linearVertAdvance) * y_factor; } - } + } _cairo_scaled_glyph_set_metrics (scaled_glyph, &scaled_font->base, @@ -2000,6 +2000,11 @@ _cairo_ft_scaled_glyph_init (void *abstract_font, } else { status = _render_glyph_bitmap (face, &scaled_font->ft_options.base, &surface); + + if (likely (status == CAIRO_STATUS_SUCCESS)) { + status = _transform_glyph_bitmap (&scaled_font->base.ctm, &surface); + } + if (likely (status == CAIRO_STATUS_SUCCESS) && unscaled->have_shape) {