Hash :
9982b644
Author :
Date :
2001-08-07T21:21:16
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
#include "FTSize.h"
#include "FTGL.h"
FTSize::FTSize()
: size(0)
{}
FTSize::~FTSize()
{}
bool FTSize::CharSize( FT_Face* ftFace, int point_size, int x_resolution, int y_resolution )
{
size = point_size;
err = FT_Set_Char_Size( *ftFace, 0L, point_size * 64, x_resolution, y_resolution);
ftSize = (*ftFace)->size;
return !err;
}
int FTSize::Ascender() const
{
return ftSize->metrics.ascender >> 6;
}
int FTSize::Descender() const
{
return ftSize->metrics.descender >> 6;
}
int FTSize::Height() const
{
return ftSize->metrics.height >> 6;
}
int FTSize::Width() const
{
return ftSize->metrics.max_advance >> 6;
}
int FTSize::Underline() const
{
return 0;
}