clan::FontMetrics Class Reference

Font metrics class. More...

#include <font_metrics.h>

Public Member Functions

Construction
 FontMetrics (float height=0.0f, float ascent=0.0f, float descent=0.0f, float internal_leading=0.0f, float external_leading=0.0f, float average_character_width=0.0f, float max_character_width=0.0f, float weight=0.0f, float overhang=0.0f, float digitized_aspect_x=0.0f, float digitized_aspect_y=0.0f, bool italic=false, bool underlined=false, bool struck_out=false, bool fixed_pitch=false)
 
 ~FontMetrics ()
 
Attributes
float get_height () const
 Returns the height of the font. More...
 
float get_ascent () const
 Returns the font ascender. More...
 
float get_descent () const
 Returns the font descender. More...
 
float get_internal_leading () const
 Returns the amount of leading (space) inside the bounds set by the get_height() function. More...
 
float get_external_leading () const
 Returns the amount of extra leading (space) that the application adds between rows. More...
 
float get_average_character_width () const
 Returns the average width of characters in the font. More...
 
float get_max_character_width () const
 Returns the width of the widest character in the font. More...
 
float get_weight () const
 Returns the weight of the font. More...
 
float get_overhang () const
 Returns the extra width per string that may be added to some synthesized fonts. More...
 
float get_digitized_aspect_x () const
 Returns the horizontal aspect of the device for which the font was designed. More...
 
float get_digitized_aspect_y () const
 Returns the vertical aspect of the device for which the font was designed. More...
 
std::string::value_type get_first_char () const
 Returns the value of the first character defined in the font. More...
 
std::string::value_type get_last_char () const
 Returns the value of the last character defined in the font. More...
 
std::string::value_type get_default_char () const
 Returns the value of the character to be substituted for characters not in the font. More...
 
std::string::value_type get_word_break_char () const
 Returns the value of the character that will be used to define word breaks for text justification. More...
 
bool is_italic () const
 Returns true if the font is italic. More...
 
bool is_underlined () const
 Returns true if the font is underlined. More...
 
bool is_struck_out () const
 Returns true if the font is struck out. More...
 
bool is_fixed_pitch () const
 Returns true if the font is a mono space font. More...
 
Operations
void set_height (float value)
 Set the height of the font. More...
 
void set_ascent (float value)
 Set the font ascender. More...
 
void set_descent (float value)
 Set the font descender. More...
 
void set_internal_leading (float value)
 Set the amount of leading (space) inside the bounds set by the set_height() function. More...
 
void set_external_leading (float value)
 Set the amount of extra leading (space) that the application adds between rows. More...
 
void set_average_character_width (float value)
 Set the average width of characters in the font. More...
 
void set_max_character_width (float value)
 Set the width of the widest character in the font. More...
 
void set_weight (float value)
 Set the weight of the font. More...
 
void set_overhang (float value)
 Set the extra width per string that may be added to some synthesized fonts. More...
 
void set_digitized_aspect_x (float value)
 Set the horizontal aspect of the device for which the font was designed. More...
 
void set_digitized_aspect_y (float value)
 Set the vertical aspect of the device for which the font was designed. More...
 
void set_italic (bool value)
 Set if the font is italic. More...
 
void set_underlined (bool value)
 Set if the font is underlined. More...
 
void set_struck_out (bool value)
 Set if the font is struck out. More...
 
void set_fixed_pitch (bool value)
 Set if the font is a mono space font. More...
 

Detailed Description

Font metrics class.


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