📄 group__font__fns.htm
字号:
<td class="md" nowrap valign="top">void GUIAPI GetGlyphBitmap </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct__LOGFONT.htm">LOGFONT</a> * </td> <td class="mdname" nowrap> <em>log_font</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const unsigned char * </td> <td class="mdname" nowrap> <em>mchar</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>mchar_len</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__GLYPHBITMAP.htm">GLYPHBITMAP</a> * </td> <td class="mdname" nowrap> <em>glyph_bitmap</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets the glyph bitmap information when uses a logical font to output a character. <p>This function gets the glyph bitmap of one multi-byte character (specified by <em>mchar</em> and <em>mchar_len</em>) and returns the bitmap information through <em>font_bitmap</em> when using <em>log_font</em> to render the character.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>log_font</em> </td><td>The logical font used to render the character. </td></tr> <tr><td valign="top"></td><td valign="top"><em>mchar</em> </td><td>The pointer to the multi-byte character. </td></tr> <tr><td valign="top"></td><td valign="top"><em>mchar_len</em> </td><td>The length of the multi-byte character. </td></tr> <tr><td valign="top"></td><td valign="top"><em>glyph_bitmap</em> </td><td>The buffer receives the glyph bitmap information. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>Example: <div class="fragment"><pre class="fragment"> <a class="code" href="struct__GLYPHBITMAP.htm">GLYPHBITMAP</a> glyph_bitmap = {0}; <a class="code" href="group__font__fns.htm#ga12">GetGlyphBitmap</a> (log_font, <span class="stringliteral">"A"</span>, 1, &glyph_bitmap);</pre></div><p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__font__fns.htm#ga11">GetFontMetrics</a>, <a class="el" href="group__font__fns.htm#ga10">GLYPHBITMAP</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga17" doxytag="gdi.h::GetLogFontInfo"></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">void GUIAPI GetLogFontInfo </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname" nowrap> <em>hdc</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__LOGFONT.htm">LOGFONT</a> * </td> <td class="mdname" nowrap> <em>log_font</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets logical font information of a DC. <p>This function gets the logical font information of the specified DC <em>hdc</em>, and copies to the LOGFONT structure pointed to by <em>log_font</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hdc</em> </td><td>The device context. </td></tr> <tr><td valign="top"></td><td valign="top"><em>log_font</em> </td><td>The pointer to the LOGFONT structure to save the logical font info.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__font__fns.htm#ga18">GetCurFont</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga20" doxytag="gdi.h::GetNextDevFont"></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">const <a class="el" href="struct__DEVFONT.htm">DEVFONT</a> *GUIAPI GetNextDevFont </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="struct__DEVFONT.htm">DEVFONT</a> * </td> <td class="mdname1" valign="top" nowrap> <em>dev_font</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get next devfont information. <p>This function can be used to enumerate all device fonts loaded by MiniGUI.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>dev_font</em> </td><td>The pointer to the current device font, can be NULL to get the first device font. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The next device font. </dd></dl> </td> </tr></table><a class="anchor" name="ga22" doxytag="gdi.h::LoadDevFontFromFile"></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"><a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI LoadDevFontFromFile </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const char * </td> <td class="mdname" nowrap> <em>devfont_name</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>file_name</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__DEVFONT.htm">DEVFONT</a> ** </td> <td class="mdname" nowrap> <em>devfont</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Load device font from font file. <p>This function can be used to load device font from font file.Now,it support free type font file and qpf font file.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>devfont_name</em> </td><td>The device font name.</td></tr> <tr><td valign="top"></td><td valign="top"><em>file_name</em> </td><td>The font file name.</td></tr> <tr><td valign="top"></td><td valign="top"><em>devfont</em> </td><td>The pointer to pointer of DEVFONT structure.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, FALSE on error.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__font__fns.htm#ga20">GetNextDevFont</a>, <a class="el" href="group__font__fns.htm#ga23">DestroyDynamicDevFont</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga19" doxytag="gdi.h::SelectFont"></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"><a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> GUIAPI SelectFont </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname" nowrap> <em>hdc</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> </td> <td class="mdname" nowrap> <em>log_font</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Selects a logical font into a DC. <p>This function selects the specified logical font <em>log_font</em> into the device context <em>hdc</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hdc</em> </td><td>The device context. </td></tr> <tr><td valign="top"></td><td valign="top"><em>log_font</em> </td><td>The pointer to the logical font to be selected into the DC. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The old logical font of the DC.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__font__fns.htm#ga18">GetCurFont</a></dd></dl>Example:<p><div class="fragment"><pre class="fragment"><span class="keywordtype">void</span> OnModeDrawText (<a class="code" href="group__handles.htm#ga2">HDC</a> hdc){ <a class="code" href="struct__RECT.htm">RECT</a> rc1, rc2, rc3, rc4; <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff1 = <span class="stringliteral">"This is a good day. \n"</span> <span class="stringliteral">"This text is drawn by calling DrawText."</span>; <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff2 = <span class="stringliteral">"This is a good day. \n"</span> <span class="stringliteral">"This text is drawn by calling DrawText."</span>; <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff3 = <span class="stringliteral">"Single line text, center."</span>; <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff4 = <span class="stringliteral">"This text is drawn by calling DrawText."</span>; rc1.<a class="code" href="struct__RECT.htm#o0">left</a> = 1; rc1.<a class="code" href="struct__RECT.htm#o1">top</a> = 1; rc1.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc1.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 101; rc2.<a class="code" href="struct__RECT.htm#o0">left</a> = 0; rc2.<a class="code" href="struct__RECT.htm#o1">top</a> = 110; rc2.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc2.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 351; rc3.<a class="code" href="struct__RECT.htm#o0">left</a> = 0; rc3.<a class="code" href="struct__RECT.htm#o1">top</a> = 361; rc3.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc3.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 451; rc4.<a class="code" href="struct__RECT.htm#o0">left</a> = 0; rc4.<a class="code" href="struct__RECT.htm#o1">top</a> = 461; rc4.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc4.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 551; <a class="code" href="group__dc__attrs.htm#ga28">SetBkColor</a> (hdc, <a class="code" href="group__color__vars.htm#ga36">COLOR_lightwhite</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc1.<a class="code" href="struct__RECT.htm#o0">left</a>, rc1.<a class="code" href="struct__RECT.htm#o1">top</a>, rc1.<a class="code" href="struct__RECT.htm#o2">right</a>, rc1.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc2.<a class="code" href="struct__RECT.htm#o0">left</a>, rc2.<a class="code" href="struct__RECT.htm#o1">top</a>, rc2.<a class="code" href="struct__RECT.htm#o2">right</a>, rc2.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc3.<a class="code" href="struct__RECT.htm#o0">left</a>, rc3.<a class="code" href="struct__RECT.htm#o1">top</a>, rc3.<a class="code" href="struct__RECT.htm#o2">right</a>, rc3.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc4.<a class="code" href="struct__RECT.htm#o0">left</a>, rc4.<a class="code" href="struct__RECT.htm#o1">top</a>, rc4.<a class="code" href="struct__RECT.htm#o2">right</a>, rc4.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc1, -1, -1); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc2, -1, -1); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc3, -1, -1); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc4, -1, -1); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb12); <a class="code" href="group__text__output__fns.htm#ga35">DrawText</a> (hdc, szBuff1, -1, &rc1, DT_NOCLIP | DT_CENTER | DT_WORDBREAK); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb16); <a class="code" href="group__text__output__fns.htm#ga35">DrawText</a> (hdc, szBuff2, -1, &rc2, DT_NOCLIP | DT_RIGHT | DT_WORDBREAK); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb24); <a class="code" href="group__text__output__fns.htm#ga35">DrawText</a> (hdc, szBuff3, -1, &rc3, DT_NOCLIP | DT_SINGLELINE | DT_CENTER | DT_VCENTER); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb16); <a class="code" href="group__text__output__fns.htm#ga36">DrawTextEx</a> (hdc, szBuff4, -1, &rc4, 32, DT_NOCLIP | DT_LEFT | DT_WORDBREAK);}</pre></div> </td> </tr></table><hr size="1"><address style="align: right;"><small>Generated on Thu Nov 22 15:35:54 2007 for MiniGUI V1.6.10 API Reference by <a href="http://www.doxygen.org/index.html"><img src="http://www.minigui.com/api_ref/1.6.10/doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -