Edit

kc3-lang/ftgl/src/FTGLExtrdFont.cpp

Branch :

  • Show log

    Commit

  • Author : sammy
    Date : 2008-04-04 12:43:38
    Hash : 7c358859
    Message : * Generate a config.h file instead of passing all defines in the compiler command line. * "make install" now properly installs the includes, the documentation and the .pc file. * Generate a shared library.

  • src/FTGLExtrdFont.cpp
  • #include "config.h"
    
    #include "FTGLExtrdFont.h"
    #include "FTExtrdGlyph.h"
    
    
    FTGLExtrdFont::FTGLExtrdFont( const char* fontFilePath)
    :   FTFont( fontFilePath),
        depth( 0.0f)
    {}
    
    
    FTGLExtrdFont::FTGLExtrdFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
    :   FTFont( pBufferBytes, bufferSizeInBytes),
        depth( 0.0f)
    {}
    
    
    FTGLExtrdFont::~FTGLExtrdFont()
    {}
    
    
    FTGlyph* FTGLExtrdFont::MakeGlyph( unsigned int glyphIndex)
    {
        FT_GlyphSlot ftGlyph = face.Glyph( glyphIndex, FT_LOAD_NO_HINTING);
    
        if( ftGlyph)
        {
            FTExtrdGlyph* tempGlyph = new FTExtrdGlyph( ftGlyph, depth, useDisplayLists);
            return tempGlyph;
        }
    
        err = face.Error();
        return NULL;
    }