blob: 77f9007d5262ecb2959244bffc10daec815722e3 [file] [log] [blame]
<!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>FTGL: FTGLOutlineFont.cpp Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>FTGLOutlineFont.cpp</h1><a href="FTGLOutlineFont_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="preprocessor">#include "<a class="code" href="FTGLOutlineFont_8h.html">FTGLOutlineFont.h</a>"</span>
00002 <span class="preprocessor">#include "<a class="code" href="FTOutlineGlyph_8h.html">FTOutlineGlyph.h</a>"</span>
00003
00004
<a name="l00005"></a><a class="code" href="classFTGLOutlineFont.html#a0">00005</a> <a class="code" href="classFTGLOutlineFont.html#a0">FTGLOutlineFont::FTGLOutlineFont</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* fontFilePath)
00006 : <a class="code" href="classFTFont.html">FTFont</a>( fontFilePath)
00007 {}
00008
00009
<a name="l00010"></a><a class="code" href="classFTGLOutlineFont.html#a1">00010</a> <a class="code" href="classFTGLOutlineFont.html#a0">FTGLOutlineFont::FTGLOutlineFont</a>( <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pBufferBytes, size_t bufferSizeInBytes)
00011 : <a class="code" href="classFTFont.html">FTFont</a>( pBufferBytes, bufferSizeInBytes)
00012 {}
00013
00014
<a name="l00015"></a><a class="code" href="classFTGLOutlineFont.html#a2">00015</a> <a class="code" href="classFTGLOutlineFont.html#a2">FTGLOutlineFont::~FTGLOutlineFont</a>()
00016 {}
00017
00018
00019 <a class="code" href="classFTGlyph.html">FTGlyph</a>* <a class="code" href="classFTFont.html#b0">FTGLOutlineFont::MakeGlyph</a>( <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> g)
00020 {
00021 FT_GlyphSlot ftGlyph = face.<a class="code" href="classFTFace.html#a10">Glyph</a>( g, FT_LOAD_NO_HINTING);
00022
00023 <span class="keywordflow">if</span>( ftGlyph)
00024 {
00025 <a class="code" href="classFTOutlineGlyph.html">FTOutlineGlyph</a>* tempGlyph = <span class="keyword">new</span> <a class="code" href="classFTOutlineGlyph.html">FTOutlineGlyph</a>( ftGlyph, useDisplayLists);
00026 <span class="keywordflow">return</span> tempGlyph;
00027 }
00028
00029 <a class="code" href="classFTFont.html#p3">err</a> = <a class="code" href="classFTFont.html#p0">face</a>.<a class="code" href="classFTFace.html#a12">Error</a>();
00030 <span class="keywordflow">return</span> NULL;
00031 }
00032
00033
<a name="l00034"></a><a class="code" href="classFTGLOutlineFont.html#a3">00034</a> <span class="keywordtype">void</span> <a class="code" href="classFTGLOutlineFont.html#a3">FTGLOutlineFont::Render</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* string)
00035 {
00036 glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
00037
00038 glDisable( GL_TEXTURE_2D);
00039
00040 glEnable( GL_LINE_SMOOTH);
00041 glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
00042 glEnable(GL_BLEND);
00043 glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); <span class="comment">// GL_ONE</span>
00044
00045 <a class="code" href="classFTFont.html#a19">FTFont::Render</a>( string);
00046
00047 glPopAttrib();
00048 }
00049
00050
<a name="l00051"></a><a class="code" href="classFTGLOutlineFont.html#a4">00051</a> <span class="keywordtype">void</span> <a class="code" href="classFTGLOutlineFont.html#a3">FTGLOutlineFont::Render</a>( <span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* string)
00052 {
00053 glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
00054
00055 glDisable( GL_TEXTURE_2D);
00056
00057 glEnable( GL_LINE_SMOOTH);
00058 glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
00059 glEnable(GL_BLEND);
00060 glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); <span class="comment">// GL_ONE</span>
00061
00062 <a class="code" href="classFTFont.html#a19">FTFont::Render</a>( string);
00063
00064 glPopAttrib();
00065 }
00066
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Dec 5 22:24:06 2004 for FTGL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>