diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-03-01 19:43:31 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-03-01 19:43:31 +0000 |
commit | 329c7a4b5be9a071fee983e2e78484c9a39ef0f8 (patch) | |
tree | f0af886d6eca0ca82e84741bac9b60fdc21a2f07 /pango | |
parent | d78c3e7a162c8f3f82f6c12f16aca7cb60e0e1d9 (diff) | |
download | pango-329c7a4b5be9a071fee983e2e78484c9a39ef0f8.tar.gz |
Treat glyph 0 as an 0 size, non-drawn glyph consistent with other
Fri Mar 1 14:37:47 2002 Owen Taylor <otaylor@redhat.com>
* pango/pangoxft-font.c (pango_xft_font_get_glyph_extents):
Treat glyph 0 as an 0 size, non-drawn glyph consistent
with other backends. (#71931)
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pangoxft-font.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pango/pangoxft-font.c b/pango/pangoxft-font.c index fef5e06a..30246d39 100644 --- a/pango/pangoxft-font.c +++ b/pango/pangoxft-font.c @@ -306,7 +306,7 @@ pango_xft_real_render (Display *display, } } - else + else if (glyph) { if (draw) XftDrawString32 (draw, color, xft_font, @@ -521,7 +521,7 @@ pango_xft_font_get_glyph_extents (PangoFont *font, logical_rect->height = (xft_font->ascent + xft_font->descent) * PANGO_SCALE; } } - else + else if (glyph) { XftTextExtents32 (display, xft_font, &glyph, 1, &extents); @@ -541,6 +541,23 @@ pango_xft_font_get_glyph_extents (PangoFont *font, logical_rect->height = (xft_font->ascent + xft_font->descent) * PANGO_SCALE; } } + else + { + if (ink_rect) + { + ink_rect->x = 0; + ink_rect->width = 0; + ink_rect->y = 0; + ink_rect->height = 0; + } + if (logical_rect) + { + logical_rect->x = 0; + logical_rect->width = 0; + logical_rect->y = 0; + logical_rect->height = 0; + } + } } static PangoMap * |