Hash :
ee107630
Author :
Date :
2008-03-03T16:41:35
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
#include "FTGLBufferFont.h"
#include "FTBufferGlyph.h"
FTGLBufferFont::FTGLBufferFont( const char* fontname)
: FTFont( fontname),
buffer(0)
{}
FTGLBufferFont::FTGLBufferFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes),
buffer(0)
{}
FTGLBufferFont::~FTGLBufferFont()
{}
FTGlyph* FTGLBufferFont::MakeGlyph( unsigned int g)
{
FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
if( ftGlyph)
{
FTBufferGlyph* tempGlyph = new FTBufferGlyph( ftGlyph, buffer);
return tempGlyph;
}
err = face.Error();
return NULL;
}
void FTGLBufferFont::Render( const char* string)
{
if( NULL != buffer)
{
FTFont::Render( string);
}
}
void FTGLBufferFont::Render( const wchar_t* string)
{
if( NULL != buffer)
{
FTFont::Render( string);
}
}