From: handa Date: Fri, 13 Aug 2004 12:02:35 +0000 (+0000) Subject: (Mfreetype, Mxft): Extern them. X-Git-Tag: REL-1-1-0~17 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7c8c5730053791db0079d9026805354af23cefc2;p=m17n%2Fm17n-lib.git (Mfreetype, Mxft): Extern them. (mfont_resize_ratio): Extern it. (MDrawGlyphInfo): New member logical_width; (MDrawGlyph): New type. (mdraw_glyph_list): Prototype adjusted. --- diff --git a/src/m17n-gui.h b/src/m17n-gui.h index 66dd07f..a9fb460 100644 --- a/src/m17n-gui.h +++ b/src/m17n-gui.h @@ -93,8 +93,6 @@ extern MSymbol Mwidget; extern MSymbol Mdepth; extern MSymbol Mcolormap; -extern MSymbol Mx; - extern MFrame *mframe (MPlist *plist); extern void *mframe_get_prop (MFrame *frame, MSymbol key); @@ -141,6 +139,8 @@ typedef struct MFont MFont; /*=*/ +extern MSymbol Mx, Mfreetype, Mxft; + extern MPlist *mfont_freetype_path; extern MFont *mfont (); @@ -215,6 +215,8 @@ extern MSymbol *mfont_selection_priority (); extern int mfont_set_selection_priority (MSymbol *keys); +extern int mfont_resize_ratio (MFont *font); + /* end of font module */ /*=*/ @@ -758,6 +760,33 @@ typedef struct int left_from, left_to; int right_from, right_to; + /***en Logical width of the glyph. Nominal distance to the next + glyph. */ + /***ja ¥°¥ê¥Õ¤ÎÏÀÍýŪÉý¡£¼¡¤Î¥°¥ê¥Õ¤È¤Î̾Ìܾå¤Îµ÷Î¥¡£ */ + int logical_width; +} MDrawGlyphInfo; + +/*=*/ + +/*** @ingroup m17nDraw */ +/***en + @brief Type of information about a glyph metric and font. + + The type #MDrawGlyph is the structure that contains information + about a glyph metric and font. It is used by the function + mdraw_glyph_list (). */ +/***ja + @brief ¥°¥ê¥Õ¤ÎÀ£Ë¡¤È¥Õ¥©¥ó¥È¤Ë´Ø¤¹¤ë¾ðÊó¤Î·¿Àë¸À. + + #MDrawGlyph ·¿¤Ï¥°¥ê¥Õ¤ÎÀ£Ë¡¤È¥Õ¥©¥ó¥È¤Ë´Ø¤¹¤ë¾ðÊó¤ò´Þ¤à¹½Â¤ÂΤǤ¢ + ¤ë¡£mdraw_glyph_list () ¤Ï¤³¤ì¤òÍѤ¤¤ë¡£ */ + +typedef struct +{ + /***en Character range corresponding to the glyph. */ + /***ja ¥°¥ê¥Õ¤ËÂбþ¤¹¤ëʸ»ú¤ÎÈÏ°Ï. */ + int from, to; + /***en Font glyph code of the glyph. */ /***ja ¥Õ¥©¥ó¥ÈÆâ¤Î¥°¥ê¥Õ¥³¡¼¥É¡£ */ int glyph_code; @@ -765,9 +794,37 @@ typedef struct /***en Logical width of the glyph. Nominal distance to the next glyph. */ /***ja ¥°¥ê¥Õ¤ÎÏÀÍýŪÉý¡£¼¡¤Î¥°¥ê¥Õ¤È¤Î̾Ìܾå¤Îµ÷Î¥¡£ */ - int logical_width; + int x_advance, y_advance; -} MDrawGlyphInfo; + /***en X/Y offset relative to the glyph position. */ + /***ja ¥°¥ê¥Õ¤Î°ÌÃÖ¤ËÂФ¹¤ë X/Y ¥ª¥Õ¥»¥Ã¥È. */ + int x_off, y_off; + + /***en Metric of the glyph. */ + /***ja ¥°¥ê¥Õ¤ÎÀ£Ë¡. */ + int lbearing, rbearing; + int ascent, descent; + + /***en Font used for the glyph. Set to NULL if no font is found for + the glyph. */ + /***ja ¥°¥ê¥Õ¤Ë»È¤ï¤ì¤ë¥Õ¥©¥ó¥È¡£¸«¤Ä¤«¤é¤Ê¤±¤ì¤Ð NULL¡£ + the glyph. */ + MFont *font; + + /***en Type of the font. One of Mx, Mfreetype, Mxft. */ + /***ja ¥Õ¥©¥ó¥È¤Î¥¿¥¤¥×¡£Mx¡¢Mfreetype¡¢Mxft ¤Î¤¤¤º¤ì¤«¡£ */ + MSymbol font_type; + + /***en Pointer to the font structure. The actual type is + (XFontStruct *) if member is Mx, FT_Face if + member is Mfreetype, and (XftFont *) if + member is Mxft. */ + /***ja ¥Õ¥©¥ó¥È¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¡£¼ÂºÝ¤Î·¿¤Ï ¥á¥ó¥Ð¤¬ + Mx ¤Ê¤é (XFontStruct *)¡¢ Mfreetype ¤Ê¤é FT_Face¡¢Mxft ¤Ê¤é + (XftFont *)¡£ */ + void *fontp; + +} MDrawGlyph; /*=*/ @@ -851,7 +908,7 @@ extern int mdraw_glyph_info (MFrame *frame, MText *mt, int from, int pos, MDrawControl *control, MDrawGlyphInfo *info); extern int mdraw_glyph_list (MFrame *frame, MText *mt, int from, int to, - MDrawControl *control, MDrawGlyphInfo *info, + MDrawControl *control, MDrawGlyph *glyphs, int array_size, int *num_glyphs_return); extern void mdraw_text_items (MFrame *frame, MDrawWindow win, int x, int y,