FTGLBufferFont.cpp
Go to the documentation of this file.00001 #include "FTGLBufferFont.h"
00002 #include "FTBufferGlyph.h"
00003
00004
00005 FTGLBufferFont::FTGLBufferFont( const char* fontname)
00006 : FTFont( fontname),
00007 buffer(0)
00008 {}
00009
00010
00011 FTGLBufferFont::FTGLBufferFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
00012 : FTFont( pBufferBytes, bufferSizeInBytes),
00013 buffer(0)
00014 {}
00015
00016
00017 FTGLBufferFont::~FTGLBufferFont()
00018 {}
00019
00020
00021 FTGlyph* FTGLBufferFont::MakeGlyph( unsigned int g)
00022 {
00023 FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
00024
00025 if( ftGlyph)
00026 {
00027 FTBufferGlyph* tempGlyph = new FTBufferGlyph( ftGlyph, buffer);
00028 return tempGlyph;
00029 }
00030
00031 err = face.Error();
00032 return NULL;
00033 }
00034
00035
00036 void FTGLBufferFont::Render( const char* string)
00037 {
00038 if( NULL != buffer)
00039 {
00040 FTFont::Render( string);
00041 }
00042 }
00043
00044
00045 void FTGLBufferFont::Render( const wchar_t* string)
00046 {
00047 if( NULL != buffer)
00048 {
00049 FTFont::Render( string);
00050 }
00051 }
00052
00053
Generated on Sun Nov 21 06:30:04 2004 for FTGL by
1.3.7