*** empty log message ***
authorhanda <handa>
Fri, 12 Mar 2004 13:03:04 +0000 (13:03 +0000)
committerhanda <handa>
Fri, 12 Mar 2004 13:03:04 +0000 (13:03 +0000)
src/font-ft.c
src/internal-gui.h

index 98a54ea..83e73f0 100644 (file)
@@ -496,10 +496,11 @@ ft_render (MDrawWindow win, int x, int y,
            code = g->code;
          else
            code = FT_Get_Char_Index (ft_face, (FT_ULong) g->code);
+#if 0
 #ifdef FT_LOAD_TARGET_MONO
          FT_Load_Glyph (ft_face, code, FT_LOAD_RENDER | FT_LOAD_TARGET_MONO);
 #else
-         FT_Render_Glyph (ft_face->glyph, FT_LOAD_RENDER | FT_LOAD_MONOCHROME);
+         FT_Load_Glyph (ft_face, code, FT_LOAD_RENDER | FT_LOAD_MONOCHROME);
 #endif
          mwin__draw_bitmap (frame, win, rface, reverse,
                             x + ft_face->glyph->bitmap_left + g->xoff,
@@ -509,6 +510,17 @@ ft_render (MDrawWindow win, int x, int y,
                             ft_face->glyph->bitmap.pitch,
                             ft_face->glyph->bitmap.buffer,
                             region);
+#else
+         FT_Load_Glyph (ft_face, code, FT_LOAD_RENDER);
+         mwin__draw_pixmap (frame, win, rface, reverse,
+                            x + ft_face->glyph->bitmap_left + g->xoff,
+                            y - ft_face->glyph->bitmap_top + g->yoff,
+                            ft_face->glyph->bitmap.width,
+                            ft_face->glyph->bitmap.rows,
+                            ft_face->glyph->bitmap.pitch,
+                            ft_face->glyph->bitmap.buffer,
+                            region);
+#endif
        }
       x += g++->width;
     }
index c50d936..9208ffd 100644 (file)
@@ -236,6 +236,13 @@ extern void mwin__draw_bitmap (MFrame *frame, MDrawWindow win,
                               unsigned char *bmp,
                               MDrawRegion region);
 
+extern void mwin__draw_pixmap (MFrame *frame, MDrawWindow win,
+                              MRealizedFace *rface, int reverse,
+                              int x, int y,
+                              int width, int height, int row_bytes,
+                              unsigned char *pmp,
+                              MDrawRegion region);
+
 extern MDrawRegion mwin__region_from_rect (MDrawMetric *rect);
 
 extern void mwin__union_rect_with_region (MDrawRegion region,