DrFont class
DrFont class
Use this class instead of GDI+ Font
The DrFont type exposes the following members:
Properties
Property | Description |
---|---|
style | Gets style of this font. |
is_bold | Gets a value indicating whether this instance is bold. |
is_italic | Gets a value indicating whether this instance is italic. |
small_caps_scale_factor | Gets the SmallCaps scale factor. |
family_name | Gets name of this font. |
size_points | Gets size of this font (points). |
ascent_points | Returns the cell ascent in points. |
descent_points | Returns the cell descent in points. |
cell_height_points | Shortcut for DrFont.ascent_points + DrFont.descent_points . |
ascent_lis | Cell ascent of this font (lis). This is a vertical distance from cell top to cell baseline. |
descent_lis | Cell descent of this font (lis). This is a vertical distance from cell bottom to cell baseline. |
cell_height_lis | Returns cell height of this font (lis). This is a shortcut for DrFont.ascent_lis + DrFont.descent_lis . |
leading_lis | Returns leading of this font (lis). This is a shortcut for DrFont.line_spacing_lis - DrFont.cell_height_lis . |
leading_points | Returns leading of this font (lis). This is a shortcut for DrFont.line_spacing_lis - DrFont.cell_height_lis . |
line_spacing_lis | Returns cell spacing of this font (lis). This is a vertical distance between baselines of the two glyphs. |
line_spacing_points | Returns cell spacing of this font (points). This is a vertical distance between baselines of the two glyphs. |
style_ex | This property contains additional information about font’s style |
Methods
Method | Description |
---|---|
get_text_width_points | Gets the text width points. |
get_text_width_points | Gets the text width points. |
replace | Replace font content |
get_char_width_points | Returns width of the character (points). |
get_text_size_points | Returns measurement text box of the text in points. |
get_char_width_lis | Gets the char width lis. |
get_text_width_lis | Gets the text width lis. |
is_poorly_rendered_by_gdi_plus | Returns True for “Microsoft Sans Serif” font. This one is poorly rendered by GDI+. See Test286 and Gemini-6959. |
See Also
- module
aspose.page.font