#include <font_metrics.h>
Public Member Functions | |
Construction | |
| CL_FontMetrics () | |
| Constructs a font metrics description. | |
| CL_FontMetrics (float height, 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) | |
| ~CL_FontMetrics () | |
Attributes | |
| float | get_height () const |
| Returns the height of the font. | |
| float | get_ascent () const |
| Returns the font ascender. | |
| float | get_descent () const |
| Returns the font descender. | |
| float | get_internal_leading () const |
| Returns the amount of leading (space) inside the bounds set by the get_height() function. | |
| float | get_external_leading () const |
| Returns the amount of extra leading (space) that the application adds between rows. | |
| float | get_average_character_width () const |
| Returns the average width of characters in the font. | |
| float | get_max_character_width () const |
| Returns the width of the widest character in the font. | |
| float | get_weight () const |
| Returns the weight of the font. | |
| float | get_overhang () const |
| Returns the extra width per string that may be added to some synthesized fonts. | |
| float | get_digitized_aspect_x () const |
| Returns the horizontal aspect of the device for which the font was designed. | |
| float | get_digitized_aspect_y () const |
| Returns the vertical aspect of the device for which the font was designed. | |
| CL_String::char_type | get_first_char () const |
| Returns the value of the first character defined in the font. | |
| CL_String::char_type | get_last_char () const |
| Returns the value of the last character defined in the font. | |
| CL_String::char_type | get_default_char () const |
| Returns the value of the character to be substituted for characters not in the font. | |
| CL_String::char_type | get_word_break_char () const |
| Returns the value of the character that will be used to define word breaks for text justification. | |
| bool | is_italic () const |
| Returns true if the font is italic. | |
| bool | is_underlined () const |
| Returns true if the font is underlined. | |
| bool | is_struck_out () const |
| Returns true if the font is struck out. | |
| bool | is_fixed_pitch () const |
| Returns true if the font is a mono space font. | |
Operations | |
| void | set_height (float value) |
| Set the height of the font. | |
| void | set_ascent (float value) |
| Set the font ascender. | |
| void | set_descent (float value) |
| Set the font descender. | |
| void | set_internal_leading (float value) |
| Set the amount of leading (space) inside the bounds set by the set_height() function. | |
| void | set_external_leading (float value) |
| Set the amount of extra leading (space) that the application adds between rows. | |
| void | set_average_character_width (float value) |
| Set the average width of characters in the font. | |
| void | set_max_character_width (float value) |
| Set the width of the widest character in the font. | |
| void | set_weight (float value) |
| Set the weight of the font. | |
| void | set_overhang (float value) |
| Set the extra width per string that may be added to some synthesized fonts. | |
| void | set_digitized_aspect_x (float value) |
| Set the horizontal aspect of the device for which the font was designed. | |
| void | set_digitized_aspect_y (float value) |
| Set the vertical aspect of the device for which the font was designed. | |
| void | set_italic (bool value) |
| Set if the font is italic. | |
| void | set_underlined (bool value) |
| Set if the font is underlined. | |
| void | set_struck_out (bool value) |
| Set if the font is struck out. | |
| void | set_fixed_pitch (bool value) |
| Set if the font is a mono space font. | |
|
|
Constructs a font metrics description.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
Returns the font ascender.
|
|
|
Returns the average width of characters in the font. The average width is generally defined as the width of the letter x. The value does not include the overhang required for bold or italic characters. |
|
|
Returns the value of the character to be substituted for characters not in the font.
|
|
|
Returns the font descender.
|
|
|
Returns the horizontal aspect of the device for which the font was designed.
|
|
|
Returns the vertical aspect of the device for which the font was designed.
|
|
|
Returns the amount of extra leading (space) that the application adds between rows.
|
|
|
Returns the value of the first character defined in the font.
|
|
|
Returns the height of the font.
|
|
|
Returns the amount of leading (space) inside the bounds set by the get_height() function.
|
|
|
Returns the value of the last character defined in the font.
|
|
|
Returns the width of the widest character in the font.
|
|
|
Returns the extra width per string that may be added to some synthesized fonts.
|
|
|
Returns the weight of the font.
|
|
|
Returns the value of the character that will be used to define word breaks for text justification.
|
|
|
Returns true if the font is a mono space font.
|
|
|
Returns true if the font is italic.
|
|
|
Returns true if the font is struck out.
|
|
|
Returns true if the font is underlined.
|
|
|
Set the font ascender.
|
|
|
Set the average width of characters in the font.
|
|
|
Set the font descender.
|
|
|
Set the horizontal aspect of the device for which the font was designed.
|
|
|
Set the vertical aspect of the device for which the font was designed.
|
|
|
Set the amount of extra leading (space) that the application adds between rows.
|
|
|
Set if the font is a mono space font.
|
|
|
Set the height of the font.
|
|
|
Set the amount of leading (space) inside the bounds set by the set_height() function.
|
|
|
Set if the font is italic.
|
|
|
Set the width of the widest character in the font.
|
|
|
Set the extra width per string that may be added to some synthesized fonts.
|
|
|
Set if the font is struck out.
|
|
|
Set if the font is underlined.
|
|
|
Set the weight of the font.
|
1.4.6