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)
This commit is contained in:
parent
32497ff479
commit
56e7766c77
|
@ -642,8 +642,16 @@ exaGlyphs (CARD8 op,
|
||||||
if (glyphs[i]->info.height > maxheight)
|
if (glyphs[i]->info.height > maxheight)
|
||||||
maxheight = glyphs[i]->info.height;
|
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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get a scratch pixmap to wrap the original glyph data */
|
/* Get a scratch pixmap to wrap the original glyph data */
|
||||||
pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width,
|
pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width,
|
||||||
|
|
|
@ -642,8 +642,16 @@ exaGlyphs (CARD8 op,
|
||||||
if (glyphs[i]->info.height > maxheight)
|
if (glyphs[i]->info.height > maxheight)
|
||||||
maxheight = glyphs[i]->info.height;
|
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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get a scratch pixmap to wrap the original glyph data */
|
/* Get a scratch pixmap to wrap the original glyph data */
|
||||||
pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width,
|
pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width,
|
||||||
|
|
|
@ -642,8 +642,16 @@ exaGlyphs (CARD8 op,
|
||||||
if (glyphs[i]->info.height > maxheight)
|
if (glyphs[i]->info.height > maxheight)
|
||||||
maxheight = glyphs[i]->info.height;
|
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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get a scratch pixmap to wrap the original glyph data */
|
/* Get a scratch pixmap to wrap the original glyph data */
|
||||||
pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width,
|
pScratchPixmap = GetScratchPixmapHeader (pScreen, glyphs[0]->info.width,
|
||||||
|
|
Loading…
Reference in New Issue