extern MSymbol Mdepth;
extern MSymbol Mcolormap;
-extern MSymbol Mx;
-
extern MFrame *mframe (MPlist *plist);
extern void *mframe_get_prop (MFrame *frame, MSymbol key);
/*=*/
+extern MSymbol Mx, Mfreetype, Mxft;
+
extern MPlist *mfont_freetype_path;
extern MFont *mfont ();
extern int mfont_set_selection_priority (MSymbol *keys);
+extern int mfont_resize_ratio (MFont *font);
+
/* end of font module */
/*=*/
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;
/***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 <font_type> member is Mx, FT_Face if
+ <font_type> member is Mfreetype, and (XftFont *) if <font_type>
+ member is Mxft. */
+ /***ja ¥Õ¥©¥ó¥È¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¡£¼ÂºÝ¤Î·¿¤Ï <font_type> ¥á¥ó¥Ð¤¬
+ Mx ¤Ê¤é (XFontStruct *)¡¢ Mfreetype ¤Ê¤é FT_Face¡¢Mxft ¤Ê¤é
+ (XftFont *)¡£ */
+ void *fontp;
+
+} MDrawGlyph;
/*=*/
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,