Hash :
019af0d2
Author :
Date :
2001-07-26T05:11:34
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
#include "assert.h"
#include "FTFace.h"
#include "FTLibrary.h"
#include "FTGL.h"
// OPSignature: FTFace:FTFace()
FTFace::FTFace()
: ftFace(0),
numCharMaps(0),
numGlyphs(0)
{
//Insert your own code here.
//End of user code.
}
// OPSignature: FTFace:~FTFace()
FTFace::~FTFace()
{
if( ftFace)
{
Close();
delete ftFace; // is this a prob?
ftFace = 0;
}
}
// OPSignature: bool FTFace:open( const char*:filename FONTTYPE:fontType )
bool FTFace::Open( const char* filename)
{
ftFace = new FT_Face;
FT_Error err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), filename, 0, ftFace);
if( err == FT_Err_Unknown_File_Format)
{
// ... the font file could be opened and read, but it appears
// ... that its font format is unsupported
delete ftFace;
ftFace = 0;
return false;
}
else if( err)
{
// ... another error code means that the font file could not
// ... be opened or read, or simply that it is broken...
delete ftFace;
ftFace = 0;
return false;
}
return true;
}
// OPSignature: bool FTFace:open( const char*:filename FONTTYPE:fontType )
void FTFace::Close()
{
FT_Done_Face( *ftFace);
}
// OPSignature: bool FTFace:SetSize( const int:size const int:res )
FTSize& FTFace::Size( const int size, const int res )
{
charSize.CharSize( ftFace, size, res, res);
return charSize;
}
// OPSignature: void FTFace:SetCharMap( CHARMAP:encoding )
bool FTFace::CharMap( CHARMAP encoding )
{
//Insert your own code here.
//End of user code.
}
// OPSignature: FT_Glyph FTFace:GetGlyph( int:index )
FT_Glyph FTFace::Glyph( int index )
{
//Insert your own code here.
//End of user code.
}
// OPSignature: FT_Vector FTFace:GetKernAdvance( int:index1 int:index2 )
FT_Vector FTFace::KernAdvance( int index1, int index2 )
{
//Insert your own code here.
//End of user code.
}