diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-02-04 21:53:01 +0000 |
---|---|---|
committer | Chris Wilson <cpwilson@src.gnome.org> | 2007-02-04 21:53:01 +0000 |
commit | ee4147edf2bff9a844a5b1e2f1c17fc5f988afa0 (patch) | |
tree | 936296ebcb127338e735dbe1735b85342efee2f4 /src/vtepangox.c | |
parent | 71b1922740896554509a64e77c4f3598a2031b71 (diff) |
Bug 106618 – CJK 'fixed width' font and 's p a c e d o u t' issue
2007-02-04 Chris Wilson <chris@chris-wilson.co.uk>
Bug 106618 – CJK 'fixed width' font and 's p a c e d o u t' issue
* src/vtedraw.h:
* src/vteglyph.c: (_vte_glyph_cache_set_font_description):
* src/vtepango.c: (_vte_pango_set_text_font):
* src/vtepangox.c: (_vte_pango_x_set_text_font):
* src/vtexft.c: (_vte_xft_set_text_font):
Detect a change in font between wide-chars and recheck for a
fixed-width estimate.
svn path=/trunk/; revision=1618
Diffstat (limited to 'src/vtepangox.c')
-rw-r--r-- | src/vtepangox.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vtepangox.c b/src/vtepangox.c index f61d101..58ffedf 100644 --- a/src/vtepangox.c +++ b/src/vtepangox.c @@ -279,7 +279,7 @@ _vte_pango_x_set_text_font(struct _vte_draw *draw, PangoLayout *layout; PangoLayoutIter *iter; PangoRectangle ink, logical; - gunichar full_codepoints[] = {VTE_DRAW_DOUBLE_WIDE_CHARACTERS}; + gunichar full_codepoints[] = {VTE_DRAW_DOUBLE_WIDE_IDEOGRAPHS}; GString *full_string; gint full_width; guint i; @@ -325,7 +325,8 @@ _vte_pango_x_set_text_font(struct _vte_draw *draw, /* If they're the same, then we have a screwy font. */ if (full_width == draw->width) { - draw->width /= 2; + /* add 1 to round up when dividing by 2 */ + draw->width = (draw->width + 1) / 2; } draw->width = PANGO_PIXELS(draw->width); |