diff options
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r-- | pango/pango-layout.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 137ebabd..af816689 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -2297,9 +2297,14 @@ get_x_offset (PangoLayout *layout, *x_offset = 0; else if (alignment == PANGO_ALIGN_RIGHT) *x_offset = layout_width - line_width; - else if (alignment == PANGO_ALIGN_CENTER) + else if (alignment == PANGO_ALIGN_CENTER) { *x_offset = (layout_width - line_width) / 2; - else + /* hinting */ + if (((layout_width | line_width) & (PANGO_SCALE - 1)) == 0) + { + *x_offset = PANGO_UNITS_ROUND (*x_offset); + } + } else *x_offset = 0; /* Indentation */ |