Font Class
Summary: Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
Module: aspose.imaging
Full Name: aspose.imaging.Font
Constructors
Name | Description |
---|---|
Font(font_name, em_size) | Initializes a new Font using a specified size. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT, the font style to FontStyle.REGULAR. |
Font(font_name, em_size, style) | Initializes a new Font using a specified size and style. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT. |
Font(font_name, em_size, style, unit) | Initializes a new Font using a specified size, style, and unit. |
Font(font_name, em_size, style, unit, character_set) | Initializes a new Font using a specified size, style, unit, and character set. |
Font(font_name, em_size, unit) | Initializes a new Font using a specified size and unit. The character set is set to CharacterSet.DEFAULT, the style is set to FontStyle.REGULAR. |
Font(prototype, new_style) | Initializes a new Font that uses the specified existing Font and FontStyle enumeration. |
Properties
Name | Type | Access | Description |
---|---|---|---|
bold | bool | r | Gets a value indicating whether this Font is bold. |
character_set | CharacterSet | r | Gets a byte value that specifies the character set that this Font uses. |
italic | bool | r | Gets a value indicating whether this Font is italic. |
name | string | r | Gets the face name of this Font. |
size | float | r | Gets the em-size of this Font measured in the units specified by the Font.unit property. |
strikeout | bool | r | Gets a value indicating whether this Font specifies a horizontal line through the font. |
style | FontStyle | r | Gets style information for this Font. |
underline | bool | r | Gets a value indicating whether this Font is underlined. |
unit | GraphicsUnit | r | Gets the unit of measure for this Font. |
Methods
Name | Description |
---|---|
create_from_prototype(prototype, new_style) | Initializes a new Font that uses the specified existing Font and FontStyle enumeration. |
create_with_size(font_name, em_size) | Initializes a new Font using a specified size. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT, the font style to FontStyle.REGULAR. |
create_with_size_style(font_name, em_size, style) | Initializes a new Font using a specified size and style. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT. |
create_with_size_unit(font_name, em_size, unit) | Initializes a new Font using a specified size and unit. The character set is set to CharacterSet.DEFAULT, the style is set to FontStyle.REGULAR. |
deep_clone() | Creates an exact deep copy of this Font. |
Constructor: Font(font_name, em_size)
Font(font_name, em_size)
Initializes a new Font using a specified size. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT, the font style to FontStyle.REGULAR.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size, in points, of the new font. |
Constructor: Font(font_name, em_size, style)
Font(font_name, em_size, style)
Initializes a new Font using a specified size and style. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size, in points, of the new font. |
style | FontStyle | The FontStyle of the new font. |
Constructor: Font(font_name, em_size, style, unit)
Font(font_name, em_size, style, unit)
Initializes a new Font using a specified size, style, and unit.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size of the new font in the units specified by the unit parameter. |
style | FontStyle | The FontStyle of the new font. |
unit | GraphicsUnit | The GraphicsUnit of the new font. |
Constructor: Font(font_name, em_size, style, unit, character_set)
Font(font_name, em_size, style, unit, character_set)
Initializes a new Font using a specified size, style, unit, and character set.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size of the new font in the units specified by the unit parameter. |
style | FontStyle | The FontStyle of the new font. |
unit | GraphicsUnit | The GraphicsUnit of the new font. |
character_set | CharacterSet | A character set to use for this font. |
Constructor: Font(font_name, em_size, unit)
Font(font_name, em_size, unit)
Initializes a new Font using a specified size and unit. The character set is set to CharacterSet.DEFAULT, the style is set to FontStyle.REGULAR.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size of the new font in the units specified by the unit parameter. |
unit | GraphicsUnit | The GraphicsUnit of the new font. |
Constructor: Font(prototype, new_style)
Font(prototype, new_style)
Initializes a new Font that uses the specified existing Font and FontStyle enumeration.
Parameters:
Parameter | Type | Description |
---|---|---|
prototype | Font | The existing Font from which to create the new Font. |
new_style | FontStyle | The FontStyle to apply to the new Font. Multiple values of the FontStyle enumeration can be combined with the OR operator. |
Method: create_from_prototype(prototype, new_style) [static]
create_from_prototype(prototype, new_style)
Initializes a new Font that uses the specified existing Font and FontStyle enumeration.
Parameters:
Parameter | Type | Description |
---|---|---|
prototype | Font | The existing Font from which to create the new Font. |
new_style | FontStyle | The FontStyle to apply to the new Font. Multiple values of the FontStyle enumeration can be combined with the OR operator. |
Returns
Type | Description |
---|---|
Font |
Method: create_with_size(font_name, em_size) [static]
create_with_size(font_name, em_size)
Initializes a new Font using a specified size. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT, the font style to FontStyle.REGULAR.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size, in points, of the new font. |
Returns
Type | Description |
---|---|
Font |
Method: create_with_size_style(font_name, em_size, style) [static]
create_with_size_style(font_name, em_size, style)
Initializes a new Font using a specified size and style. The character set is set to CharacterSet.DEFAULT, the graphics unit to GraphicsUnit.POINT.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size, in points, of the new font. |
style | FontStyle | The FontStyle of the new font. |
Returns
Type | Description |
---|---|
Font |
Method: create_with_size_unit(font_name, em_size, unit) [static]
create_with_size_unit(font_name, em_size, unit)
Initializes a new Font using a specified size and unit. The character set is set to CharacterSet.DEFAULT, the style is set to FontStyle.REGULAR.
Parameters:
Parameter | Type | Description |
---|---|---|
font_name | string | A string representation of the Font name. |
em_size | float | The em-size of the new font in the units specified by the unit parameter. |
unit | GraphicsUnit | The GraphicsUnit of the new font. |
Returns
Type | Description |
---|---|
Font |
Method: deep_clone()
deep_clone()
Creates an exact deep copy of this Font.
Returns
Type | Description |
---|---|
Font | The Font this method creates. |