From a89ff5479c7b11891acecef35f9c5dbad2dec78e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 28 Jul 2018 10:50:35 -0400 Subject: fc: Stop rounding glyph positions As we move towards subpixel positioning in cairo, rounding the glyph positions and widths that we pass into cairo is counterproductive. So stop doing that. --- pango/pangofc-shape.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/pango/pangofc-shape.c b/pango/pangofc-shape.c index a59ca67c..a00b8c33 100644 --- a/pango/pangofc-shape.c +++ b/pango/pangofc-shape.c @@ -504,39 +504,6 @@ _pango_fc_shape (PangoFont *font, hb_position++; } - if (fc_font->is_hinted) - { - if (context.x_scale == 1.0 && context.y_scale == 1.0) - { - for (i = 0; i < num_glyphs; i++) - infos[i].geometry.width = PANGO_UNITS_ROUND (infos[i].geometry.width); - } - else - { -#if 0 - if (context.vertical) - { - /* XXX */ - double tmp = x_scale; - x_scale = y_scale; - y_scale = -tmp; - } -#endif -#define HINT(value, scale_inv, scale) (PANGO_UNITS_ROUND ((int) ((value) * scale)) * scale_inv) -#define HINT_X(value) HINT ((value), context.x_scale, x_scale_inv) -#define HINT_Y(value) HINT ((value), context.y_scale, y_scale_inv) - for (i = 0; i < num_glyphs; i++) - { - infos[i].geometry.width = HINT_X (infos[i].geometry.width); - infos[i].geometry.x_offset = HINT_X (infos[i].geometry.x_offset); - infos[i].geometry.y_offset = HINT_Y (infos[i].geometry.y_offset); - } -#undef HINT_Y -#undef HINT_X -#undef HINT - } - } - release_buffer (hb_buffer, free_buffer); hb_font_destroy (hb_font); hb_face_destroy (hb_face); -- cgit v1.2.1