Logo Search packages:      
Sourcecode: blender version File versions

FTGLBufferFont.cpp

#include    "FTGLBufferFont.h"
#include    "FTBufferGlyph.h"


00005 FTGLBufferFont::FTGLBufferFont( const char* fontname)
:   FTFont( fontname),
    buffer(0)
{}


00011 FTGLBufferFont::FTGLBufferFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
:   FTFont( pBufferBytes, bufferSizeInBytes),
    buffer(0)
{}


00017 FTGLBufferFont::~FTGLBufferFont()
{}


00021 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;
}


00036 void FTGLBufferFont::Render( const char* string)
{   
    if( NULL != buffer)
    {
        FTFont::Render( string);
    }
}


00045 void FTGLBufferFont::Render( const wchar_t* string)
{   
    if( NULL != buffer)
    {
        FTFont::Render( string);
    }
}



Generated by  Doxygen 1.6.0   Back to index