Edit

kc3-lang/ftgl/src/FTGLExtrdFont.cpp

Branch :

  • Show log

    Commit

  • Author : henry
    Date : 2002-12-16 08:27:39
    Hash : 59259511
    Message : Refactored FTFont to get rid of Open function

  • src/FTGLExtrdFont.cpp
  • #include    "FTGLExtrdFont.h"
    #include    "FTExtrdGlyph.h"
    
    
    FTGLExtrdFont::FTGLExtrdFont( const char* fontname)
    :   FTFont( fontname),
        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 g)
    {
        FT_Glyph* ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
    
        if( ftGlyph)
        {
            FTExtrdGlyph* tempGlyph = new FTExtrdGlyph( *ftGlyph, depth);
            return tempGlyph;
        }
    
        err = face.Error();
        return NULL;
    }