Files
test2/extern/bFTGL/src/FTGLBufferFont.cpp
Kent Mein 26f63bfa19 Added bFTGL to extern and updated the Makefiles. I'm guessing there will
need to be tweaks but it seems to work on my linux box.  I haven't
touched any of the other build systems so those will need to be done.

We probably don't need all of this stuff but I figured better to add a little
too much then to little.

Kent
2005-01-21 05:15:33 +00:00

54 lines
904 B
C++
Executable File

#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);
}
}