Font Class

Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  System.DrawingFont

Namespace:  System.Drawing
Assembly:  Aspose.Drawing (in Aspose.Drawing.dll) Version: 20.9.0.0 (20.9.0)
Syntax
C#
public sealed class Font : IDisposable

The Font type exposes the following members.

Constructors
  NameDescription
Public methodFont(String, Single)
Initializes a new instance of the Font class using a specified size.
Public methodFont(Font, FontStyle)
Initializes a new instance of the Font class uses the specified existing Font and FontStyle enumeration..
Public methodFont(FontFamily, Single)
Initializes a new instance of the Font class.
Public methodFont(String, Single, FontStyle)
Initializes a new instance of the Font class using a specified size and style.
Public methodFont(String, Single, GraphicsUnit)
Initializes a new instance of the Font class using a specified size and unit. The style is set to Regular.
Public methodFont(FontFamily, Single, FontStyle)
Initializes a new instance of the Font class using a specified size and style..
Public methodFont(FontFamily, Single, GraphicsUnit)
Initializes a new instance of the Font class using a specified size and unit. Sets the style to Regular.
Public methodFont(String, Single, FontStyle, GraphicsUnit)
Initializes a new instance of the Font class using a specified size, style, and unit.
Public methodFont(FontFamily, Single, FontStyle, GraphicsUnit)
Initializes a new instance of the Font class using a specified size, style, and unit.
Public methodFont(String, Single, FontStyle, GraphicsUnit, Byte)
Initializes a new instance of the Font class using a specified size, style, unit, and character set.
Public methodFont(FontFamily, Single, FontStyle, GraphicsUnit, Byte)
Initializes a new instance of the Font class using a specified size, style, unit, and character set..
Public methodFont(String, Single, FontStyle, GraphicsUnit, Byte, Boolean)
Initializes a new instance of the Font class using the specified size, style, unit, and character set.
Public methodFont(FontFamily, Single, FontStyle, GraphicsUnit, Byte, Boolean)
Initializes a new instance of the Font class using a specified size, style, unit, and character set..
Properties
  NameDescription
Public propertyBold
Gets a value indicating whether this Font is bold.
Public propertyFontFamily
Gets the FontFamily associated with this Font.
Public propertyGdiCharSet
Gets a byte value that specifies the GDI character set that this Font uses.
Public propertyGdiVerticalFont
Gets a value indicating whether this Font is derived from a GDI vertical font..
Public propertyHeight
Gets the line spacing of this font.
Public propertyIsSystemFont
Gets a value indicating whether the font is a member of SystemFonts.
Public propertyItalic
Gets a value indicating whether this Font is italic.
Public propertyName
Gets the face name of this Font.
Public propertyOriginalFontName
Gets the name of the font originally specified.
Public propertySize
Gets the em-size of this Font measured in the units specified by the Unit property.
Public propertySizeInPoints
Gets the em-size, in points, of this Font.
Public propertyStrikeout
Gets a value indicating whether this Font specifies a horizontal line through the font.
Public propertyStyle
Gets style information for this Font.
Public propertySystemFontName
Gets the name of the system font if the IsSystemFont property returns true.
Public propertyUnderline
Gets a value indicating whether this Font is underlined.
Public propertyUnit
Gets the unit of measure for this Font.
Methods
  NameDescription
Public methodClone
Creates an exact copy of this Font.
Public methodDispose
Releases all resources used by this Font.
Public methodEquals
Indicates whether the specified object is a Font and has the same FontFamily, [M:GdiVerticalFont], [M:GdiCharSet], [M:Style], [M:Size], and [M:Unit] property values as this Font.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Gets the hash code for this Font.
(Overrides ObjectGetHashCode.)
Public methodGetHeight
Returns the line spacing, in pixels, of this font.
Public methodGetHeight(Single)
Returns the height, in pixels, of this Font when drawn to a device with the specified vertical resolution.
Public methodGetHeight(Graphics)
Returns the line spacing, in the current unit of a specified Graphics, of this font.
Public methodGetType (Inherited from Object.)
Public methodToString
Returns a human-readable string representation of this Font.
(Overrides ObjectToString.)
See Also