Mfontconfig = msymbol ("fontconfig");
+ Mx = msymbol ("x");
+ Mfreetype = msymbol ("freetype");
+ Mxft = msymbol ("xft");
+
/* The first entry of each mfont__property_table must be Mnil so
that actual properties get positive numeric numbers. */
for (i = 0; i <= MFONT_REGISTRY; i++)
MSymbol Mfontconfig;
+/***en
+ @brief Symbol of name "x".
+
+ The variable #Mx is to be used for a value of <type> member of the
+ structure #MDrawGlyph to specify the type of <fontp> member is
+ actually (XFontStruct *). */
+
+MSymbol Mx;
+
+/***en
+ @brief Symbol of name "freetype".
+
+ The variable #Mfreetype is to be used for a value of <type> member
+ of the structure #MDrawGlyph to specify the type of <fontp> member
+ is actually FT_Face. */
+
+MSymbol Mfreetype;
+
+/***en
+ @brief Symbol of name "xft".
+
+ The variable #Mxft is to be used for a value of <type> member of the
+ structure #MDrawGlyph to specify the type of <fontp> member
+ is actually (XftFont *). */
+
+MSymbol Mxft;
+
/*=*/
/*** @} */
/*=*/
return mfont_parse_name (name, Mx);
}
+/*=*/
+
+/***en
+ @brief Get resize information of a font.
+
+ The mfont_resize_ratio () function lookups the m17n database
+ \<font, reisize\> and returns a resizing ratio (in percentage) of
+ FONT. For instance, if the return value is 150, that means that
+ the m17n library uses an 1.5 time bigger font than a specified
+ size. */
+
+/***ja
+ @brief ¥Õ¥©¥ó¥È¤Î¥ê¥µ¥¤¥º¾ðÊó¤òÆÀ¤ë
+
+ ´Ø¿ô mfont_resize_ratio ¤Ï m17n ¥Ç¡¼¥¿¥Ù¡¼¥¹ \<font, reisize\> ¤ò¸¡
+ º÷¤·¡¢¥Õ¥©¥ó¥È FONT ¤Î¥ê¥µ¥¤¥º¤ÎÈæΨ¡Ê¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¡Ë¤òÊÖ¤¹¡£Î㤨
+ ¤ÐÊÖÃͤ¬ 150 ¤Ç¤¢¤ì¤Ð¡¢m17n ¥é¥¤¥Ö¥é¥ê¤Ï»ØÄꤵ¤ì¤¿¥µ¥¤¥º¤Î 1.5 ÇܤÎ
+ ¥Õ¥©¥ó¥È¤ò»ÈÍѤ¹¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£ */
+
+int
+mfont_resize_ratio (MFont *font)
+{
+ MFont request = *font;
+
+ mfont__resize (font, &request);
+ return (font->property[MFONT_SIZE] * 100 / request.property[MFONT_SIZE]);
+}
+
+
/*** @} */
/*** @addtogroup m17nDebug */