All Classes |Grouped Classes |Index

Class CL_FontMetrics

Font metrics class. More...

Derived from:

None

Derived by:

None

Group:

Font (Display)

#include <ClanLib/display.h>

Class Members:

Construction:

CL_FontMetrics

Constructs a null instance.


Attributes:

is_null

Returns true if this object is invalid.

throw_if_null

Throw an exception if this object is invalid.

get_height

Returns the height of the font.

get_ascent

Returns the font ascender.

get_descent

Returns the font descender.

get_internal_leading

Returns the amount of leading (space) inside the bounds set by the get_height() function.

get_external_leading

Returns the amount of extra leading (space) that the application adds between rows.

get_average_character_width

Returns the average width of characters in the font.

get_max_character_width

Returns the width of the widest character in the font.

get_weight

Returns the weight of the font.

get_overhang

Returns the extra width per string that may be added to some synthesized fonts.

get_digitized_aspect_x

Returns the horizontal aspect of the device for which the font was designed.

get_digitized_aspect_y

Returns the vertical aspect of the device for which the font was designed.

get_first_char

Returns the value of the first character defined in the font.

get_last_char

Returns the value of the last character defined in the font.

get_default_char

Returns the value of the character to be substituted for characters not in the font.

get_word_break_char

Returns the value of the character that will be used to define word breaks for text justification.

is_italic

Returns true if the font is italic.

is_underlined

Returns true if the font is underlined.

is_struck_out

Returns true if the font is struck out.

is_fixed_pitch

Returns true if the font is a mono space font.


Operations:

set_height

Set the height of the font.

set_ascent

Set the font ascender.

set_descent

Set the font descender.

set_internal_leading

Set the amount of leading (space) inside the bounds set by the set_height() function.

set_external_leading

Set the amount of extra leading (space) that the application adds between rows.

set_average_character_width

Set the average width of characters in the font.

set_max_character_width

Set the width of the widest character in the font.

set_weight

Set the weight of the font.

set_overhang

Set the extra width per string that may be added to some synthesized fonts.

set_digitized_aspect_x

Set the horizontal aspect of the device for which the font was designed.

set_digitized_aspect_y

Set the vertical aspect of the device for which the font was designed.

set_italic

Set if the font is italic.

set_underlined

Set if the font is underlined.

set_struck_out

Set if the font is struck out.

set_fixed_pitch

Set if the font is a mono space font.