X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ddc3964ed95d01e72229dc9af968a327cd84e56c..a4da9cccc2575c4bf299bde9594dad3e049ddf6a:/lib/gdi/font.cpp diff --git a/lib/gdi/font.cpp b/lib/gdi/font.cpp index ee228576..9a7ec069 100644 --- a/lib/gdi/font.cpp +++ b/lib/gdi/font.cpp @@ -60,12 +60,12 @@ static gLookup &getColor(const gPalette &pal, const gRGB &start, const gRGB &end if (i != colorcache.end()) return i->second; gLookup &n=colorcache.insert(std::pair(key,gLookup())).first->second; - eDebug("[FONT] creating new font color cache entry %02x%02x%02x%02x .. %02x%02x%02x%02x", start.a, start.r, start.g, start.b, - end.a, end.r, end.g, end.b); +// eDebug("[FONT] creating new font color cache entry %02x%02x%02x%02x .. %02x%02x%02x%02x", start.a, start.r, start.g, start.b, +// end.a, end.r, end.g, end.b); n.build(16, pal, start, end); -/* for (int i=0; i<16; i++) - eDebugNoNewLine("%02x|%02x%02x%02x%02x ", (int)n.lookup[i], pal.data[n.lookup[i]].a, pal.data[n.lookup[i]].r, pal.data[n.lookup[i]].g, pal.data[n.lookup[i]].b); - eDebug("");*/ +// for (int i=0; i<16; i++) +// eDebugNoNewLine("%02x|%02x%02x%02x%02x ", (int)n.lookup[i], pal.data[n.lookup[i]].a, pal.data[n.lookup[i]].r, pal.data[n.lookup[i]].g, pal.data[n.lookup[i]].b); +// eDebug(""); return n; } @@ -467,7 +467,7 @@ int eTextPara::renderString(const std::string &string, int rflags) while(p != string.end()) { - unsigned int unicode=*p++; + unsigned int unicode=(unsigned char)*p++; if (unicode & 0x80) // we have (hopefully) UTF8 here, and we assume that the encoding is VALID { @@ -675,6 +675,7 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons continue; int rx=i->x+glyph_bitmap->left + offset.x(); int ry=i->y-glyph_bitmap->top + offset.y(); + __u8 *d=(__u8*)(surface->data)+buffer_stride*ry+rx*surface->bypp; __u8 *s=glyph_bitmap->buffer; register int sx=glyph_bitmap->width; @@ -706,6 +707,7 @@ void eTextPara::blit(gDC &dc, const ePoint &offset, const gRGB &background, cons { register __u8 *td=d; register int ax; + for (ax=0; ax>4;