From 56e7766c775385b0c6e09e6a65a1c8e10dba786e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 21 Sep 2005 22:26:07 +0000 Subject: [PATCH] Bug #4541: Fix text drawing in the case where a list contains no non-zero-sized glyphs. Several variables weren't updated, resulting in rendering simply stopping when this case was hit. (Anders Kaseorg) --- exa/exa_render.c | 10 +++++++++- hw/xfree86/exa/exa_render.c | 10 +++++++++- hw/xfree86/exa/exapict.c | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/exa/exa_render.c b/exa/exa_render.c index f770a154a..24bbe48a9 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -642,8 +642,16 @@ exaGlyphs (CARD8 op, if (glyphs[i]->info.height > maxheight) maxheight = glyphs[i]->info.height; } - if (maxwidth == 0 || maxheight == 0) + if (maxwidth == 0 || maxheight == 0) { + while (n--) + { + glyph = *glyphs++; + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; continue; + } /* Get a scratch pixmap to wrap the original glyph data */ pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width, diff --git a/hw/xfree86/exa/exa_render.c b/hw/xfree86/exa/exa_render.c index f770a154a..24bbe48a9 100644 --- a/hw/xfree86/exa/exa_render.c +++ b/hw/xfree86/exa/exa_render.c @@ -642,8 +642,16 @@ exaGlyphs (CARD8 op, if (glyphs[i]->info.height > maxheight) maxheight = glyphs[i]->info.height; } - if (maxwidth == 0 || maxheight == 0) + if (maxwidth == 0 || maxheight == 0) { + while (n--) + { + glyph = *glyphs++; + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; continue; + } /* Get a scratch pixmap to wrap the original glyph data */ pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width, diff --git a/hw/xfree86/exa/exapict.c b/hw/xfree86/exa/exapict.c index f770a154a..24bbe48a9 100644 --- a/hw/xfree86/exa/exapict.c +++ b/hw/xfree86/exa/exapict.c @@ -642,8 +642,16 @@ exaGlyphs (CARD8 op, if (glyphs[i]->info.height > maxheight) maxheight = glyphs[i]->info.height; } - if (maxwidth == 0 || maxheight == 0) + if (maxwidth == 0 || maxheight == 0) { + while (n--) + { + glyph = *glyphs++; + x += glyph->info.xOff; + y += glyph->info.yOff; + } + list++; continue; + } /* Get a scratch pixmap to wrap the original glyph data */ pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width,