1
#include "FTGLOutlineFont.h"
2
#include "FTOutlineGlyph.h"
5
FTGLOutlineFont::FTGLOutlineFont( const char* fontname)
10
FTGLOutlineFont::FTGLOutlineFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
11
: FTFont( pBufferBytes, bufferSizeInBytes)
15
FTGLOutlineFont::~FTGLOutlineFont()
19
FTGlyph* FTGLOutlineFont::MakeGlyph( unsigned int g)
21
FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
25
FTOutlineGlyph* tempGlyph = new FTOutlineGlyph( ftGlyph);
34
void FTGLOutlineFont::Render( const char* string)
36
glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
38
glDisable( GL_TEXTURE_2D);
40
glEnable( GL_LINE_SMOOTH);
41
glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
43
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE
45
FTFont::Render( string);
51
void FTGLOutlineFont::Render( const wchar_t* string)
53
glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
55
glDisable( GL_TEXTURE_2D);
57
glEnable( GL_LINE_SMOOTH);
58
glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
60
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE
62
FTFont::Render( string);