+ if (print_inverse) /* special mode for text gadgets */
+ {
+ /* first step: draw solid colored rectangle (use "cursor" character) */
+ if (print_inverse_cursor)
+ BlitBitmap(font->bitmap, dst_bitmap,
+ font->src_x + FONT_CHARS_PER_LINE * font->width,
+ font->src_y + 3 * font->height,
+ font->width, font->height, dst_x, dst_y);
+
+ /* second step: draw masked black rectangle (use "space" character) */
+ SetClipOrigin(font->bitmap, font->bitmap->stored_clip_gc,
+ dst_x - src_x, dst_y - src_y);
+ BlitBitmapMasked(font->bitmap, dst_bitmap,
+ 0, 0, font->width, font->height, dst_x, dst_y);
+ }
+ else if (mask_mode == FONT_MASKED)
+ {
+ /* clear font character background */
+ ClearRectangleOnBackground(dst_bitmap, dst_x, dst_y,
+ font->width, font->height);
+
+#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
+ /* use special font tile clipmasks */
+ {
+ int font_char = (c >= 32 && c <= 95 ? c - 32 : 0);
+
+ SetClipMask(font->bitmap, font_clip_gc,
+ font->clip_mask[font_char]);
+ SetClipOrigin(font->bitmap, font_clip_gc, dst_x, dst_y);
+ }
+#else
+ SetClipOrigin(font->bitmap, font->bitmap->stored_clip_gc,
+ dst_x - src_x, dst_y - src_y);
+#endif
+
+ BlitBitmapMasked(font->bitmap, dst_bitmap, src_x, src_y,
+ font->width, font->height, dst_x, dst_y);
+ }
+ else /* normal, non-masked font blitting */