summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2018-07-28 10:50:35 -0400
committerMatthias Clasen <mclasen@redhat.com>2018-07-28 10:52:32 -0400
commita89ff5479c7b11891acecef35f9c5dbad2dec78e (patch)
treebaae06a8dfb6434df867b151e904e54db14af5c5
parent9a4bfe1d69c77492a6843b8ef1c5f87f5a72395c (diff)
downloadpango-subpixel-prep.tar.gz
fc: Stop rounding glyph positionssubpixel-prep
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.
-rw-r--r--pango/pangofc-shape.c33
1 files changed, 0 insertions, 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);