--- sourceforge.net/trunk/rdesktop/xwin.c 2003/11/10 15:09:49 547 +++ sourceforge.net/trunk/rdesktop/xwin.c 2004/01/16 23:15:33 564 @@ -1823,33 +1823,34 @@ {\ glyph = cache_get_font (font, ttext[idx]);\ if (!(flags & TEXT2_IMPLICIT_X))\ + {\ + xyoffset = ttext[++idx];\ + if ((xyoffset & 0x80))\ {\ - xyoffset = ttext[++idx];\ - if ((xyoffset & 0x80))\ - {\ - if (flags & TEXT2_VERTICAL) \ - y += ttext[idx+1] | (ttext[idx+2] << 8);\ - else\ - x += ttext[idx+1] | (ttext[idx+2] << 8);\ - idx += 2;\ - }\ + if (flags & TEXT2_VERTICAL)\ + y += ttext[idx+1] | (ttext[idx+2] << 8);\ else\ - {\ - if (flags & TEXT2_VERTICAL) \ - y += xyoffset;\ - else\ - x += xyoffset;\ - }\ + x += ttext[idx+1] | (ttext[idx+2] << 8);\ + idx += 2;\ }\ - if (glyph != NULL)\ + else\ {\ - ui_draw_glyph (mixmode, x + glyph->offset,\ - y + glyph->baseline,\ - glyph->width, glyph->height,\ - glyph->pixmap, 0, 0, bgcolour, fgcolour);\ - if (flags & TEXT2_IMPLICIT_X)\ - x += glyph->width;\ + if (flags & TEXT2_VERTICAL)\ + y += xyoffset;\ + else\ + x += xyoffset;\ }\ + }\ + if (glyph != NULL)\ + {\ + x1 = x + glyph->offset;\ + y1 = y + glyph->baseline;\ + XSetStipple(g_display, g_gc, (Pixmap) glyph->pixmap);\ + XSetTSOrigin(g_display, g_gc, x1, y1);\ + FILL_RECTANGLE_BACKSTORE(x1, y1, glyph->width, glyph->height);\ + if (flags & TEXT2_IMPLICIT_X)\ + x += glyph->width;\ + }\ } void @@ -1859,7 +1860,7 @@ int fgcolour, uint8 * text, uint8 length) { FONTGLYPH *glyph; - int i, j, xyoffset; + int i, j, xyoffset, x1, y1; DATABLOB *entry; SET_FOREGROUND(bgcolour); @@ -1873,6 +1874,10 @@ FILL_RECTANGLE_BACKSTORE(clipx, clipy, clipcx, clipcy); } + SET_FOREGROUND(fgcolour); + SET_BACKGROUND(bgcolour); + XSetFillStyle(g_display, g_gc, FillStippled); + /* Paint text, character by character */ for (i = 0; i < length;) { @@ -1923,6 +1928,9 @@ break; } } + + XSetFillStyle(g_display, g_gc, FillSolid); + if (g_ownbackstore) { if (boxcx > 1)