#include <FTSize.h>
Public Member Functions | |
FTSize () | |
virtual | ~FTSize () |
bool | CharSize (FT_Face *face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution) |
unsigned int | CharSize () const |
float | Ascender () const |
float | Descender () const |
float | Height () const |
float | Width () const |
float | Underline () const |
FT_Error | Error () const |
FTSize () | |
virtual | ~FTSize () |
bool | CharSize (FT_Face *face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution) |
unsigned int | CharSize () const |
float | Ascender () const |
float | Descender () const |
float | Height () const |
float | Width () const |
float | Underline () const |
FT_Error | Error () const |
Private Attributes | |
FT_Face * | ftFace |
FT_Size | ftSize |
unsigned int | size |
unsigned int | xResolution |
unsigned int | yResolution |
FT_Error | err |
FT_Face * | ftFace |
Definition at line 18 of file FTSize.h.
FTSize::FTSize | ( | ) |
Default Constructor
Definition at line 4 of file FTSize.cxx.
FTSize::~FTSize | ( | ) | [virtual] |
Destructor
Definition at line 14 of file FTSize.cxx.
FTSize::FTSize | ( | ) |
Default Constructor
virtual FTSize::~FTSize | ( | ) | [virtual] |
Destructor
bool FTSize::CharSize | ( | FT_Face * | face, | |
unsigned int | point_size, | |||
unsigned int | x_resolution, | |||
unsigned int | y_resolution | |||
) |
Sets the char size for the current face.
This doesn't guarantee that the size was set correctly. Clients should check errors.
face | Parent face for this size object | |
point_size | the face size in points (1/72 inch) | |
x_resolution | the horizontal resolution of the target device. | |
y_resolution | the vertical resolution of the target device. |
true
if the size has been set. Clients should check Error() for more information if this function returns false() Definition at line 18 of file FTSize.cxx.
References err, FT_Set_Char_Size(), ftFace, ftSize, RooFitShortHand::L(), size, xResolution, and yResolution.
Referenced by FTFont::FaceSize(), and FTFace::Size().
unsigned int FTSize::CharSize | ( | ) | const |
get the char size for the current face.
Definition at line 42 of file FTSize.cxx.
References size.
float FTSize::Ascender | ( | ) | const |
Gets the global ascender height for the face in pixels.
Definition at line 48 of file FTSize.cxx.
References FT_Size_Metrics_::ascender, ftSize, and FT_SizeRec_::metrics.
Referenced by FTFont::Ascender().
float FTSize::Descender | ( | ) | const |
Gets the global descender height for the face in pixels.
Definition at line 54 of file FTSize.cxx.
References FT_Size_Metrics_::descender, ftSize, and FT_SizeRec_::metrics.
Referenced by FTFont::Descender().
float FTSize::Height | ( | ) | const |
Gets the global face height for the face.
If the face is scalable this returns the height of the global bounding box which ensures that any glyph will be less than or equal to this height. If the font isn't scalable there is no guarantee that glyphs will not be taller than this value.
Definition at line 60 of file FTSize.cxx.
References FT_IS_SCALABLE, ftFace, ftSize, FT_Size_Metrics_::height, FT_SizeRec_::metrics, and FT_Size_Metrics_::y_ppem.
Referenced by FTFont::LineHeight(), and FTGLTextureFont::MakeGlyph().
float FTSize::Width | ( | ) | const |
Gets the global face width for the face.
If the face is scalable this returns the width of the global bounding box which ensures that any glyph will be less than or equal to this width. If the font isn't scalable this value is the max_advance for the face.
Definition at line 72 of file FTSize.cxx.
References FT_IS_SCALABLE, ftFace, ftSize, FT_Size_Metrics_::max_advance, FT_SizeRec_::metrics, and FT_Size_Metrics_::x_ppem.
Referenced by FTGLTextureFont::MakeGlyph().
float FTSize::Underline | ( | ) | const |
Gets the underline position for the face.
Definition at line 84 of file FTSize.cxx.
FT_Error FTSize::Error | ( | ) | const [inline] |
Queries for errors.
Definition at line 102 of file FTSize.h.
Referenced by FTFace::Size().
bool FTSize::CharSize | ( | FT_Face * | face, | |
unsigned int | point_size, | |||
unsigned int | x_resolution, | |||
unsigned int | y_resolution | |||
) |
Sets the char size for the current face.
This doesn't guarantee that the size was set correctly. Clients should check errors.
face | Parent face for this size object | |
point_size | the face size in points (1/72 inch) | |
x_resolution | the horizontal resolution of the target device. | |
y_resolution | the vertical resolution of the target device. |
unsigned int FTSize::CharSize | ( | ) | const |
get the char size for the current face.
float FTSize::Ascender | ( | ) | const |
Gets the global ascender height for the face in pixels.
float FTSize::Descender | ( | ) | const |
Gets the global descender height for the face in pixels.
float FTSize::Height | ( | ) | const |
Gets the global face height for the face.
If the face is scalable this returns the height of the global bounding box which ensures that any glyph will be less than or equal to this height. If the font isn't scalable there is no guarantee that glyphs will not be taller than this value.
float FTSize::Width | ( | ) | const |
Gets the global face width for the face.
If the face is scalable this returns the width of the global bounding box which ensures that any glyph will be less than or equal to this width. If the font isn't scalable this value is the max_advance for the face.
float FTSize::Underline | ( | ) | const |
Gets the underline position for the face.
FT_Error FTSize::Error | ( | ) | const [inline] |
FT_Face* FTSize::ftFace [private] |
FT_Size FTSize::ftSize [private] |
The Freetype size.
Definition at line 113 of file FTSize.h.
Referenced by Ascender(), CharSize(), Descender(), Height(), and Width().
unsigned int FTSize::size [private] |
unsigned int FTSize::xResolution [private] |
unsigned int FTSize::yResolution [private] |
FT_Error FTSize::err [private] |
Current error code. Zero means no error.
Definition at line 133 of file FTSize.h.
Referenced by CharSize().
FT_Face* FTSize::ftFace [private] |