- if (!opcode) // 4bit lookup to 8bit
- {
- register __u8 *td=d;
- register int ax;
-
- for (ax=0; ax<sx; ax++)
- {
- register int b=(*s++)>>4;
- if(b)
- *td++=lookup8[b];
- else
- td++;
- }
- } else if (opcode == 1) // 8bit direct
- {
- register __u8 *td=d;
- register int ax;
- for (ax=0; ax<sx; ax++)
- {
- register int b=*s++;
- *td++^=b;
- }
- } else
+ lookup8 = lookup8_normal;
+ lookup32 = lookup32_normal;
+ } else
+ {
+ lookup8 = lookup8_invert;
+ lookup32 = lookup32_invert;
+ }
+
+ static FTC_SBit glyph_bitmap;
+ if (fontRenderClass::instance->getGlyphBitmap(&i->font->font, i->glyph_index, &glyph_bitmap))
+ 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;
+ int sy=glyph_bitmap->height;
+ if ((sy+ry) >= clip.rects[c].bottom())
+ sy=clip.rects[c].bottom()-ry;
+ if ((sx+rx) >= clip.rects[c].right())
+ sx=clip.rects[c].right()-rx;
+ if (rx < clip.rects[c].left())
+ {
+ int diff=clip.rects[c].left()-rx;
+ s+=diff;
+ sx-=diff;
+ rx+=diff;
+ d+=diff*surface->bypp;
+ }
+ if (ry < clip.rects[c].top())
+ {
+ int diff=clip.rects[c].top()-ry;
+ s+=diff*glyph_bitmap->pitch;
+ sy-=diff;
+ ry+=diff;
+ d+=diff*buffer_stride;
+ }
+ if (sx>0)
+ for (int ay=0; ay<sy; ay++)