Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

FTSize Class Reference

#include <FTSize.h>


Detailed Description

FTSize class provides an abstraction layer for the Freetype Size.

See also:
"Freetype 2 Documentation"

Definition at line 18 of file FTSize.h.

Public Member Functions

 FTSize ()
 Default Constructor.

virtual ~FTSize ()
 Destructor.

bool CharSize (FT_Face *face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution)
 Sets the char size for the current face.

unsigned int CharSize () const
 get the char size for the current face.

float Ascender () const
 Gets the global ascender height for the face in pixels.

float Descender () const
 Gets the global descender height for the face in pixels.

float Height () const
 Gets the global face height for the face.

float Width () const
 Gets the global face width for the face.

float Underline () const
 Gets the underline position for the face.

FT_Error Error () const
 Queries for errors.


Constructor & Destructor Documentation

FTSize::FTSize  ) 
 

Default Constructor.

Definition at line 4 of file FTSize.cpp.

FTSize::~FTSize  )  [virtual]
 

Destructor.

Definition at line 14 of file FTSize.cpp.


Member Function Documentation

float FTSize::Ascender  )  const
 

Gets the global ascender height for the face in pixels.

Returns:
Ascender height

Definition at line 52 of file FTSize.cpp.

Referenced by FTFont::Ascender().

unsigned int FTSize::CharSize  )  const
 

get the char size for the current face.

Returns:
The char size in points

Definition at line 46 of file FTSize.cpp.

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.

Parameters:
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.
Returns:
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.cpp.

Referenced by FTFont::FaceSize(), and FTFace::Size().

float FTSize::Descender  )  const
 

Gets the global descender height for the face in pixels.

Returns:
Ascender height

Definition at line 58 of file FTSize.cpp.

Referenced by FTFont::Descender().

FT_Error FTSize::Error  )  const [inline]
 

Queries for errors.

Returns:
The current error code.

Definition at line 102 of file FTSize.h.

Referenced by FTFace::Size().

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.

Returns:
height in pixels.

Definition at line 64 of file FTSize.cpp.

Referenced by FTFont::LineHeight().

float FTSize::Underline  )  const
 

Gets the underline position for the face.

Returns:
underline position in pixels

Definition at line 100 of file FTSize.cpp.

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.

Returns:
width in pixels.

Definition at line 82 of file FTSize.cpp.


The documentation for this class was generated from the following files:
Generated on Sun Dec 5 22:24:07 2004 for FTGL by doxygen 1.3.6