Commit 9f258bd6 authored by Marek Kašík's avatar Marek Kašík Committed by Carlos Garcia Campos

[dvi] Test glyph->data for MDVI_GLYPH_EMPTY

MDVI marks empty glyphs by setting its data pointer to 0x1
(MDVI_GLYPH_EMPTY constant) but it doesn't check for the
emptiness sometimes. Fixes bug #600552.
parent a56a0369
......@@ -55,7 +55,9 @@ dvi_cairo_draw_glyph (DviContext *dvi,
glyph = &ch->grey;
isbox = (glyph->data == NULL || (dvi->params.flags & MDVI_PARAM_CHARBOXES));
isbox = (glyph->data == NULL ||
(dvi->params.flags & MDVI_PARAM_CHARBOXES) ||
MDVI_GLYPH_ISEMPTY (glyph->data));
x = - glyph->x + x0 + cairo_device->xmargin;
y = - glyph->y + y0 + cairo_device->ymargin;
......
......@@ -379,10 +379,12 @@ again:
return ch;
} else if(MDVI_ENABLED(dvi, MDVI_PARAM_ANTIALIASED)) {
if(ch->grey.data &&
!MDVI_GLYPH_ISEMPTY(ch->grey.data) &&
ch->fg == dvi->curr_fg &&
ch->bg == dvi->curr_bg)
return ch;
if(ch->grey.data) {
if(ch->grey.data &&
!MDVI_GLYPH_ISEMPTY(ch->grey.data)) {
if(dvi->device.free_image)
dvi->device.free_image(ch->grey.data);
ch->grey.data = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment