From: handa Date: Fri, 12 Mar 2004 13:03:04 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=425ce64ab6e351e6932a3937d11abf423f5490f0;p=m17n%2Fm17n-lib.git *** empty log message *** --- diff --git a/src/font-ft.c b/src/font-ft.c index 98a54ea..83e73f0 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -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; } diff --git a/src/internal-gui.h b/src/internal-gui.h index c50d936..9208ffd 100644 --- a/src/internal-gui.h +++ b/src/internal-gui.h @@ -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,