DrFont class

DrFont class

Use this class instead of GDI+ Font

The DrFont type exposes the following members:

Properties

NameDescription
styleGets style of this font.
is_boldGets a value indicating whether this instance is bold.
is_italicGets a value indicating whether this instance is italic.
small_caps_scale_factorGets the SmallCaps scale factor.
family_nameGets name of this font.
size_pointsGets size of this font (points).
ascent_pointsReturns the cell ascent in points.
descent_pointsReturns the cell descent in points.
cell_height_pointsShortcut for ascent_points + descent_points.
ascent_lisCell ascent of this font (lis).
This is a vertical distance from cell top to cell baseline.
descent_lisCell descent of this font (lis).
This is a vertical distance from cell bottom to cell baseline.
cell_height_lisReturns cell height of this font (lis).
This is a shortcut for ascent_lis + descent_lis.
leading_lisReturns leading of this font (lis).
This is a shortcut for line_spacing_lis - cell_height_lis.
leading_pointsReturns leading of this font (lis).
This is a shortcut for line_spacing_lis - cell_height_lis.
line_spacing_lisReturns cell spacing of this font (lis).
This is a vertical distance between baselines of the two glyphs.
line_spacing_pointsReturns cell spacing of this font (points).
This is a vertical distance between baselines of the two glyphs.
style_exThis property contains additional information about font’s style

Methods

NameDescription
get_text_width_points(text)Gets the text width points.
get_text_width_points(text, start_index, char_count)Gets the text width points.
replace(font)Replace font content
get_char_width_points(c)Returns width of the character (points).
get_text_size_points(text)Returns measurement text box of the text in points.
get_char_width_lis(c)Gets the char width lis.
get_text_width_lis(text)Gets the text width lis.
is_poorly_rendered_by_gdi_plus(font_name)Returns True for “Microsoft Sans Serif” font. This one is poorly rendered by GDI+. See Test286 and Gemini-6959.

See Also