summaryrefslogtreecommitdiff
path: root/pango/pangofc-private.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-04-12 23:55:33 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-04-12 23:55:33 +0000
commit8ec2822cc5b8839996aaeb062f6acc0a899d98b4 (patch)
tree4ea746ea30fb59c7f7cb2bd9c15c444c8e94c6f2 /pango/pangofc-private.h
parent5a6d314da7216520b3b2d7f30ca3da5ef4444ecb (diff)
downloadpango-8ec2822cc5b8839996aaeb062f6acc0a899d98b4.tar.gz
Quantize kerning adjustment, otherwise all the metrics hinting effort will
2007-04-12 Behdad Esfahbod <behdad@gnome.org> * pango/pango-ot-buffer.c (apply_gpos_ltr), (apply_gpos_rtl), (pango_ot_buffer_output): * pango/pango-types.h: * pango/pangofc-font.c (pango_fc_font_kern_glyphs): * pango/pangofc-private.h: Quantize kerning adjustment, otherwise all the metrics hinting effort will be ruined by a non-whole-pixel kerning value. In the future we want to take lsb_delta and rsb_delta into the game before quantizing the adjustment here, but we don't have those values handy right now. svn path=/trunk/; revision=2225
Diffstat (limited to 'pango/pangofc-private.h')
-rw-r--r--pango/pangofc-private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pangofc-private.h b/pango/pangofc-private.h
index 27ad5769..09406d13 100644
--- a/pango/pangofc-private.h
+++ b/pango/pangofc-private.h
@@ -42,6 +42,9 @@ struct _PangoFcMetricsInfo
((d) - PANGO_SCALE_26_6 / 2) / PANGO_SCALE_26_6)
#define PANGO_UNITS_26_6(d) (PANGO_SCALE_26_6 * (d))
+#define PANGO_UNITS_ROUND(d) \
+ (((d) + (PANGO_SCALE >> 1)) & ~(PANGO_SCALE - 1))
+
#define PANGO_FC_GRAVITY "pangogravity"
void _pango_fc_font_shutdown (PangoFcFont *fcfont);