📄 group__font__fns.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MiniGUI V1.6.10 API Reference: Logical font operations</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical List</a> | <a class="qindex" href="annotated.htm">Data Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File List</a> | <a class="qindex" href="functions.htm">Data Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related Pages</a></div><h1>Logical font operations<br><small>[<a class="el" href="group__gdi__fns.htm">GDI functions</a>]</small></h1><h2>Data Structures</h2><ul><li>struct <a class="el" href="struct__LOGFONT.htm">_LOGFONT</a><li>struct <a class="el" href="struct__CHARSETOPS.htm">_CHARSETOPS</a><li>struct <a class="el" href="struct__FONTOPS.htm">_FONTOPS</a><li>struct <a class="el" href="struct__DEVFONT.htm">_DEVFONT</a><li>struct <a class="el" href="struct__FONTMETRICS.htm">_FONTMETRICS</a><li>struct <a class="el" href="struct__GLYPHBITMAP.htm">_GLYPHBITMAP</a></ul><h2>Defines</h2><ul><li>#define <a class="el" href="group__font__fns.htm#ga133">FONT_CHARSET_GB1988_0</a> "GB1988-0"<dl class="el"><dd class="mdescRight">EUC encoding of GB1988 charset, treat as ISO8859-1. <a href="#ga133"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga134">FONT_CHARSET_GB2312_0</a> "GB2312-0"<dl class="el"><dd class="mdescRight">EUC encoding of GB2312 charset. <a href="#ga134"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga136">FONT_CHARSET_GB18030_0</a> "GB18030-0"<dl class="el"><dd class="mdescRight">EUC encoding of GB18030 charset. <a href="#ga136"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga138">FONT_CHARSET_EUCTW</a> "EUC-TW"<dl class="el"><dd class="mdescRight">EUC encoding of CNS11643 charset, not supported. <a href="#ga138"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga140">FONT_CHARSET_KSC5636_0</a> "KSC5636-0"<dl class="el"><dd class="mdescRight">EUC encoding of KSC5636 charset, treat as ISO8859-1. <a href="#ga140"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga141">FONT_CHARSET_KSC5601_0</a> "KSC5601-0"<dl class="el"><dd class="mdescRight">EUC encoding of KSC5601 charset. <a href="#ga141"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga143">FONT_CHARSET_JISX0201_0</a> "JISX0201-0"<dl class="el"><dd class="mdescRight">EUC encoding of JISX0201 charset. <a href="#ga143"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga144">FONT_CHARSET_JISX0208_0</a> "JISX0208-0"<dl class="el"><dd class="mdescRight">EUC encoding of JISX0208 charset. <a href="#ga144"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga146">FONT_CHARSET_JISX0201_1</a> "JISX0201-1"<dl class="el"><dd class="mdescRight">Shift-JIS encoding of JISX0201 charset. <a href="#ga146"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga147">FONT_CHARSET_JISX0208_1</a> "JISX0208-1"<dl class="el"><dd class="mdescRight">Shift-JIS encoding of JISX0208 charset. <a href="#ga147"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga148">FONT_CHARSET_ISO_10646_1</a> "ISO-10646-1"<dl class="el"><dd class="mdescRight">UCS-2 encoding of UNICODE. <a href="#ga148"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga149">FONT_CHARSET_UTF8</a> "UTF-8"<dl class="el"><dd class="mdescRight">UTF-8 encoding of UNICODE. <a href="#ga149"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga150">FONT_CHARSET_UTF16LE</a> "UTF-16LE"<dl class="el"><dd class="mdescRight">UTF-16 encoding (Little-Endian) of UNICODE. <a href="#ga150"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga151">FONT_CHARSET_UTF16BE</a> "UTF-16BE"<dl class="el"><dd class="mdescRight">UTF-16 encoding (Big-Endian) of UNICODE. <a href="#ga151"></a><br></dl><li>#define <a class="el" href="group__font__fns.htm#ga200">INV_LOGFONT</a> 0<dl class="el"><dd class="mdescRight">Invalid logfont. <a href="#ga200"></a><br></dl></ul><h2>Typedefs</h2><ul><li>typedef <a class="el" href="struct__LOGFONT.htm">_LOGFONT</a> <a class="el" href="group__font__fns.htm#ga1">LOGFONT</a><li>typedef <a class="el" href="struct__LOGFONT.htm">LOGFONT</a> * <a class="el" href="group__font__fns.htm#ga2">PLOGFONT</a><dl class="el"><dd class="mdescRight">Data type of pointer to a LOGFONT. <a href="#ga2"></a><br></dl><li>typedef const <a class="el" href="struct__LOGFONT.htm">LOGFONT</a> * <a class="el" href="group__font__fns.htm#ga3">CPLOGFONT</a><dl class="el"><dd class="mdescRight">Data type of pointer to a const LOGFONT. <a href="#ga3"></a><br></dl><li>typedef <a class="el" href="struct__WORDINFO.htm">_WORDINFO</a> <a class="el" href="group__font__fns.htm#ga4">WORDINFO</a><dl class="el"><dd class="mdescRight">Date type of <a class="el" href="struct__WORDINFO.htm">_WORDINFO</a>. <a href="#ga4"></a><br></dl><li>typedef <a class="el" href="struct__CHARSETOPS.htm">_CHARSETOPS</a> <a class="el" href="group__font__fns.htm#ga7">CHARSETOPS</a><li>typedef <a class="el" href="struct__FONTOPS.htm">_FONTOPS</a> <a class="el" href="group__font__fns.htm#ga8">FONTOPS</a><li>typedef <a class="el" href="struct__FONTMETRICS.htm">_FONTMETRICS</a> <a class="el" href="group__font__fns.htm#ga9">FONTMETRICS</a><li>typedef <a class="el" href="struct__GLYPHBITMAP.htm">_GLYPHBITMAP</a> <a class="el" href="group__font__fns.htm#ga10">GLYPHBITMAP</a></ul><h2>Enumerations</h2><ul><li>enum <a class="el" href="group__font__fns.htm#ga201">mg_FT_LcdFilter</a> { <br> <a class="el" href="group__font__fns.htm#gga201a458">MG_SMOOTH_NONE</a> = 0, <a class="el" href="group__font__fns.htm#gga201a459">MG_SMOOTH_DEFAULT</a> = 1, <a class="el" href="group__font__fns.htm#gga201a460">MG_SMOOTH_LIGHT</a> = 2, <a class="el" href="group__font__fns.htm#gga201a461">MG_SMOOTH_LEGACY</a> = 16, <br> <a class="el" href="group__font__fns.htm#gga201a462">MG_SMOOTH_MAX</a><br> }</ul><h2>Functions</h2><ul><li>MG_EXPORT void GUIAPI <a class="el" href="group__font__fns.htm#ga11">GetFontMetrics</a> (<a class="el" href="struct__LOGFONT.htm">LOGFONT</a> *log_font, <a class="el" href="struct__FONTMETRICS.htm">FONTMETRICS</a> *font_metrics)<dl class="el"><dd class="mdescRight">Gets metrics information of a logical font. <a href="#ga11"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__font__fns.htm#ga12">GetGlyphBitmap</a> (<a class="el" href="struct__LOGFONT.htm">LOGFONT</a> *log_font, const unsigned char *mchar, int mchar_len, <a class="el" href="struct__GLYPHBITMAP.htm">GLYPHBITMAP</a> *glyph_bitmap)<dl class="el"><dd class="mdescRight">Gets the glyph bitmap information when uses a logical font to output a character. <a href="#ga12"></a><br></dl><li>MG_EXPORT <a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> GUIAPI <a class="el" href="group__font__fns.htm#ga13">CreateLogFont</a> (const char *type, const char *family, const char *charset, char weight, char slant, char flip, char other, char underline, char struckout, int size, int rotation)<dl class="el"><dd class="mdescRight">Creates a logical font. <a href="#ga13"></a><br></dl><li>MG_EXPORT <a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> GUIAPI <a class="el" href="group__font__fns.htm#ga14">CreateLogFontByName</a> (const char *font_name)<dl class="el"><dd class="mdescRight">Creates a logical font by a font name. <a href="#ga14"></a><br></dl><li>MG_EXPORT <a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> GUIAPI <a class="el" href="group__font__fns.htm#ga15">CreateLogFontIndirect</a> (<a class="el" href="struct__LOGFONT.htm">LOGFONT</a> *logfont)<dl class="el"><dd class="mdescRight">Creates a logical font indirectly from a LOGFONT structure. <a href="#ga15"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__font__fns.htm#ga16">DestroyLogFont</a> (<a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> log_font)<dl class="el"><dd class="mdescRight">Destroys a logical font. <a href="#ga16"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__font__fns.htm#ga17">GetLogFontInfo</a> (<a class="el" href="group__handles.htm#ga2">HDC</a> hdc, <a class="el" href="struct__LOGFONT.htm">LOGFONT</a> *log_font)<dl class="el"><dd class="mdescRight">Gets logical font information of a DC. <a href="#ga17"></a><br></dl><li>MG_EXPORT <a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> GUIAPI <a class="el" href="group__font__fns.htm#ga18">GetCurFont</a> (<a class="el" href="group__handles.htm#ga2">HDC</a> hdc)<dl class="el"><dd class="mdescRight">Gets the pointer to the current logical font of a DC. <a href="#ga18"></a><br></dl><li>MG_EXPORT <a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> GUIAPI <a class="el" href="group__font__fns.htm#ga19">SelectFont</a> (<a class="el" href="group__handles.htm#ga2">HDC</a> hdc, <a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> log_font)<dl class="el"><dd class="mdescRight">Selects a logical font into a DC. <a href="#ga19"></a><br></dl><li>MG_EXPORT const <a class="el" href="struct__DEVFONT.htm">DEVFONT</a> *GUIAPI <a class="el" href="group__font__fns.htm#ga20">GetNextDevFont</a> (const <a class="el" href="struct__DEVFONT.htm">DEVFONT</a> *dev_font)<dl class="el"><dd class="mdescRight">Get next devfont information. <a href="#ga20"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> <a class="el" href="group__font__fns.htm#ga21">ft2SetLcdFilter</a> (<a class="el" href="struct__LOGFONT.htm">LOGFONT</a> *logfont, <a class="el" href="group__font__fns.htm#ga201">mg_FT_LcdFilter</a> filter)<dl class="el"><dd class="mdescRight">Set freetype2 smooth mode. <a href="#ga21"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__font__fns.htm#ga22">LoadDevFontFromFile</a> (const char *devfont_name, const char *file_name, <a class="el" href="struct__DEVFONT.htm">DEVFONT</a> **devfont)<dl class="el"><dd class="mdescRight">Load device font from font file. <a href="#ga22"></a><br></dl><li>void GUIAPI <a class="el" href="group__font__fns.htm#ga23">DestroyDynamicDevFont</a> (<a class="el" href="struct__DEVFONT.htm">DEVFONT</a> **devfont)<dl class="el"><dd class="mdescRight">Destroy device font loaded dynamically from font file. <a href="#ga23"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>MiniGUI uses logical font to render text in a DC. You can create a logical font by using <em>CreateLogFont</em> and select it into a DC by using <em>SelectFont</em>, then you can use this logical font to render text by using <em>TextOutLen</em> or <em>DrawTextEx</em>. <hr><h2>Define Documentation</h2><a class="anchor" name="ga138" doxytag="gdi.h::FONT_CHARSET_EUCTW"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_EUCTW "EUC-TW" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>EUC encoding of CNS11643 charset, not supported. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05376">5376</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga136" doxytag="gdi.h::FONT_CHARSET_GB18030_0"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_GB18030_0 "GB18030-0" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>EUC encoding of GB18030 charset. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05369">5369</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga133" doxytag="gdi.h::FONT_CHARSET_GB1988_0"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_GB1988_0 "GB1988-0" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>EUC encoding of GB1988 charset, treat as ISO8859-1. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05356">5356</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga134" doxytag="gdi.h::FONT_CHARSET_GB2312_0"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_GB2312_0 "GB2312-0" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>EUC encoding of GB2312 charset. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05362">5362</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga148" doxytag="gdi.h::FONT_CHARSET_ISO_10646_1"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_ISO_10646_1 "ISO-10646-1" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>UCS-2 encoding of UNICODE. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05421">5421</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga143" doxytag="gdi.h::FONT_CHARSET_JISX0201_0"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_JISX0201_0 "JISX0201-0" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>EUC encoding of JISX0201 charset. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05396">5396</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga146" doxytag="gdi.h::FONT_CHARSET_JISX0201_1"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_JISX0201_1 "JISX0201-1" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Shift-JIS encoding of JISX0201 charset. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05409">5409</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga144" doxytag="gdi.h::FONT_CHARSET_JISX0208_0"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">#define FONT_CHARSET_JISX0208_0 "JISX0208-0" </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>EUC encoding of JISX0208 charset. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05402">5402</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>. </td> </tr></table><a class="anchor" name="ga147" doxytag="gdi.h::FONT_CHARSET_JISX0208_1"></a><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -