📄 classwgui_1_1cfontengine.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>wGui::CFontEngine class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> </center><hr><h1>wGui::CFontEngine Class Reference</h1><code>#include <<a class="el" href="wg__fontengine_8h-source.html">wg_fontengine.h</a>></code><p><h2>Public Methods</h2><ul><li><a class="el" href="classwGui_1_1CFontEngine.html#a0">CFontEngine</a> (const std::string &sFontFileName, unsigned char FontSize)<li><a name="a1" doxytag="wGui::CFontEngine::~CFontEngine"></a>virtual <a class="el" href="classwGui_1_1CFontEngine.html#a1">~CFontEngine</a> (void)<dl class="el"><dd><font size=-1><em>Standard destructor.<br><br></em></font></dl><li>FT_BitmapGlyphRec * <a class="el" href="classwGui_1_1CFontEngine.html#a2">RenderGlyph</a> (char Char)<li>FT_Glyph_Metrics * <a class="el" href="classwGui_1_1CFontEngine.html#a3">GetMetrics</a> (char Char)</ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CFontEngine::m_FontFace"></a>FT_Face <a class="el" href="classwGui_1_1CFontEngine.html#n0">m_FontFace</a><dl class="el"><dd><font size=-1><em>The FreeType font face.<br><br></em></font></dl><li><a name="n1" doxytag="wGui::CFontEngine::m_CachedGlyphMap"></a>std::map< char, FT_BitmapGlyphRec > <a class="el" href="classwGui_1_1CFontEngine.html#n1">m_CachedGlyphMap</a><dl class="el"><dd><font size=-1><em>A cached map of the rendered glyphs.<br><br></em></font></dl><li><a name="n2" doxytag="wGui::CFontEngine::m_CachedMetricsMap"></a>std::map< char, FT_Glyph_Metrics > <a class="el" href="classwGui_1_1CFontEngine.html#n2">m_CachedMetricsMap</a><dl class="el"><dd><font size=-1><em>A cached map of the glyph metrics.<br><br></em></font></dl></ul><h2>Static Protected Attributes</h2><ul><li><a name="q0" doxytag="wGui::CFontEngine::m_FTLibrary"></a>FT_Library <a class="el" href="classwGui_1_1CFontEngine.html#q0">m_FTLibrary</a><dl class="el"><dd><font size=-1><em>The FreeType library.<br><br></em></font></dl><li><a name="q1" doxytag="wGui::CFontEngine::m_bFTLibraryLoaded"></a>bool <a class="el" href="classwGui_1_1CFontEngine.html#q1">m_bFTLibraryLoaded</a> = false<dl class="el"><dd><font size=-1><em>Indicates if the FreeType library has been loaded.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>The CFont class is wGui's interface to FreeType2 and is used to render strings This is used by the <a class="el" href="classwGui_1_1CRenderedString.html">CRenderedString</a> class, and shouldn't need to ever be called directly <dl compact><dt><b>See also: </b></dt><dd><a class="el" href="classwGui_1_1CRenderedString.html">CRenderedString</a> </dl><p><p>Definition at line <a class="el" href="wg__fontengine_8h-source.html#l00043">43</a> of file <a class="el" href="wg__fontengine_8h-source.html">wg_fontengine.h</a>.<hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="wGui::CFontEngine::CFontEngine"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> wGui::CFontEngine::CFontEngine </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const std::string & </td> <td class="mdname" nowrap> <em>sFontFileName</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>unsigned char </td> <td class="mdname" nowrap> <em>FontSize</em></td> </tr> <tr> <td></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>Construct a new CFont object, using the specified font For most cases, there is no need to directly instantiate a <a class="el" href="classwGui_1_1CFontEngine.html">CFontEngine</a> object. <a class="el" href="classwGui_1_1CApplication.html">CApplication</a> provides a GetFontEngine() method which should be used <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>sFontFileName</em> </td><td>The file that contains a file </td></tr><tr><td valign=top><em>FontSize</em> </td><td>The size of the font (in points) </td></tr></table></dl><p>Definition at line <a class="el" href="wg__fontengine_8cpp-source.html#l00037">37</a> of file <a class="el" href="wg__fontengine_8cpp-source.html">wg_fontengine.cpp</a>.<p>References <a class="el" href="wg__fontengine_8cpp-source.html#l00034">m_bFTLibraryLoaded</a>, <a class="el" href="wg__fontengine_8h-source.html#l00069">m_FontFace</a>, and <a class="el" href="wg__fontengine_8cpp-source.html#l00033">m_FTLibrary</a>. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a3" doxytag="wGui::CFontEngine::GetMetrics"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> FT_Glyph_Metrics * wGui::CFontEngine::GetMetrics </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>Char</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>Returns the metrics for a specified character <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>Char</em> </td><td>The character to render </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>A pointer to a FreeType metrics structure </dl><p>Definition at line <a class="el" href="wg__fontengine_8cpp-source.html#l00087">87</a> of file <a class="el" href="wg__fontengine_8cpp-source.html">wg_fontengine.cpp</a>.<p>References <a class="el" href="wg__fontengine_8h-source.html#l00071">m_CachedMetricsMap</a>, and <a class="el" href="wg__fontengine_8h-source.html#l00069">m_FontFace</a>.<p>Referenced by <a class="el" href="wg__renderedstring_8cpp-source.html#l00086">wGui::CRenderedString::GetMaxFontHeight()</a>, and <a class="el" href="wg__renderedstring_8cpp-source.html#l00106">wGui::CRenderedString::GetMetrics()</a>. </td> </tr></table><a name="a2" doxytag="wGui::CFontEngine::RenderGlyph"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> FT_BitmapGlyphRec * wGui::CFontEngine::RenderGlyph </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">char </td> <td class="mdname1" valign="top" nowrap> <em>Char</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>Renders the specified character <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>Char</em> </td><td>The character to render </td></tr></table></dl><dl compact><dt><b>Returns: </b></dt><dd>A pointer to a FreeType glyph </dl><p>Definition at line <a class="el" href="wg__fontengine_8cpp-source.html#l00064">64</a> of file <a class="el" href="wg__fontengine_8cpp-source.html">wg_fontengine.cpp</a>.<p>References <a class="el" href="wg__fontengine_8h-source.html#l00070">m_CachedGlyphMap</a>, and <a class="el" href="wg__fontengine_8h-source.html#l00069">m_FontFace</a>.<p>Referenced by <a class="el" href="wg__renderedstring_8cpp-source.html#l00050">wGui::CRenderedString::Draw()</a>. </td> </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="wg__fontengine_8h-source.html">wg_fontengine.h</a><li><a class="el" href="wg__fontengine_8cpp-source.html">wg_fontengine.cpp</a></ul><hr><address style="align: right;"><small>Generated on Sat Oct 25 12:43:27 2003 for wGui by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -