summaryrefslogtreecommitdiff
path: root/pango/pango-types.h
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-04-30 23:09:47 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-04-30 23:09:47 +0000
commitbd7f0529df20a3268815da365944979af441cd3a (patch)
treefb8ed8d2a77ed919f180f7197f89695b6fd8af84 /pango/pango-types.h
parent69bcc7f2e5ca2c7135e7ba558c85fffbce2426cb (diff)
downloadpango-bd7f0529df20a3268815da365944979af441cd3a.tar.gz
Move PANGO_UNITS_ROUND here... ...from here.
2007-04-30 Behdad Esfahbod <behdad@gnome.org> * pango/pango-types.h: Move PANGO_UNITS_ROUND here... * pango/pangofc-private.h: ...from here. * pango/pango-gravity.c: Document that pango_gravity_to_rotation() returns angle in radians but pango_matrix_rotate() takes degrees. * pango/pango-layout.c (pango_layout_run_get_extents): * pango/pango-renderer.c (pango_renderer_draw_layout_line): Retain metrics hinting when centering baseline (used for Latin, etc in vertical mode). * pango/pangocairo-fcfont.c (pango_cairo_fc_font_get_metrics), (pango_cairo_fc_font_glyph_extents_cache_init): Respect metrics hinting setting when moving glyphs around for vertical writing. * pango/pangocairo-fcfont.c (_pango_cairo_fc_font_new): Apply the gravity rotation before the pattern's matrix, such that vertical text gets correct italic direction. * pango/pangocairo-font.c (_pango_cairo_font_get_hex_box_info): Make hexbox font inherit most properties from the current font. That is, bold hexbox digits for a bold font, etc. svn path=/trunk/; revision=2238
Diffstat (limited to 'pango/pango-types.h')
-rw-r--r--pango/pango-types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pango/pango-types.h b/pango/pango-types.h
index 59ecac0c..1b08f8ff 100644
--- a/pango/pango-types.h
+++ b/pango/pango-types.h
@@ -57,6 +57,10 @@ typedef guint32 PangoGlyph;
* PANGO_PIXELS also behaves differently for +512 and -512.
*/
+#define PANGO_UNITS_ROUND(d) \
+ (((d) + (PANGO_SCALE >> 1)) & ~(PANGO_SCALE - 1))
+
+
int pango_units_from_double (double d) G_GNUC_CONST;
double pango_units_to_double (int i) G_GNUC_CONST;