FlatUI
An open source project by FPL.
 All Classes Namespaces Files Functions Variables Enumerations Groups Pages
flatui::FontMetrics Class Reference

This class has additional properties for font metrics. More...

#include <font_buffer.h>

Detailed Description

This class has additional properties for font metrics.

For details of font metrics, refer http://support.microsoft.com/kb/32667 In this class, ascender and descender values are retrieved from FreeType font property.

And internal/external leading values are updated based on rendering glyph information. When rendering a string, the leading values tracks max (min for internal leading) value in the string.

Public Member Functions

 FontMetrics ()
 The default constructor for FontMetrics.
 
 FontMetrics (int32_t base_line, int32_t internal_leading, int32_t ascender, int32_t descender, int32_t external_leading)
 The constructor with initialization parameters for FontMetrics.
 
 ~FontMetrics ()
 The destructor for FontMetrics.
 
int32_t base_line () const
 
void set_base_line (int32_t base_line)
 set the baseline value. More...
 
int32_t internal_leading () const
 
void set_internal_leading (int32_t internal_leading)
 Set the internal leading parameter value. More...
 
int32_t ascender () const
 
void set_ascender (int32_t ascender)
 Set the ascender value. More...
 
int32_t descender () const
 
void set_descender (int32_t descender)
 Set the descender value. More...
 
int32_t external_leading () const
 
void set_external_leading (int32_t external_leading)
 Set the external leading parameter value. More...
 
int32_t total () const
 

Member Function Documentation

int32_t flatui::FontMetrics::ascender ( ) const
inline
Returns
Returns the ascender value as an int32_t.
int32_t flatui::FontMetrics::base_line ( ) const
inline
Returns
Returns the baseline value as an int32_t.
int32_t flatui::FontMetrics::descender ( ) const
inline
Returns
Returns the descender value as an int32_t.
int32_t flatui::FontMetrics::external_leading ( ) const
inline
Returns
Returns the external leading parameter value as an int32_t.
int32_t flatui::FontMetrics::internal_leading ( ) const
inline
Returns
Returns the internal leading parameter as an int32_t.
void flatui::FontMetrics::set_ascender ( int32_t  ascender)
inline

Set the ascender value.

Parameters
[in]ascenderAn int32_t to set as the ascender value.
void flatui::FontMetrics::set_base_line ( int32_t  base_line)
inline

set the baseline value.

Parameters
[in]base_lineAn int32_t to set as the baseline value.
void flatui::FontMetrics::set_descender ( int32_t  descender)
inline

Set the descender value.

Parameters
[in]descenderAn int32_t to set as the descender value.
void flatui::FontMetrics::set_external_leading ( int32_t  external_leading)
inline

Set the external leading parameter value.

Parameters
[in]external_leadingAn int32_t to set as the external leading value.
void flatui::FontMetrics::set_internal_leading ( int32_t  internal_leading)
inline

Set the internal leading parameter value.

Parameters
[in]internal_leadingAn int32_t to set as the internal leading value.
int32_t flatui::FontMetrics::total ( ) const
inline
Returns
Returns the total height of the glyph.

The documentation for this class was generated from the following file: