Font

Font class

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

public sealed class Font

Constructors

NameDescription
Font(Font, FontStyle)Initializes a new Font that uses the specified existing Font and FontStyle enumeration.
Font(string, float)Initializes a new Font using a specified size. The character set is set to Default, the graphics unit to Point, the font style to Regular.
Font(string, float, FontStyle)Initializes a new Font using a specified size and style. The character set is set to Default, the graphics unit to Point.
Font(string, float, GraphicsUnit)Initializes a new Font using a specified size and unit. The character set is set to Default, the style is set to Regular.
Font(string, float, FontStyle, GraphicsUnit)Initializes a new Font using a specified size, style, and unit.
Font(string, float, FontStyle, GraphicsUnit, CharacterSet)Initializes a new Font using a specified size, style, unit, and character set.

Properties

NameDescription
Bold { get; }Gets a value indicating whether this Font is bold.
CharacterSet { get; }Gets a byte value that specifies the character set that this Font uses.
Italic { get; }Gets a value indicating whether this Font is italic.
Name { get; }Gets the face name of this Font.
Size { get; }Gets the em-size of this Font measured in the units specified by the Unit property.
Strikeout { get; }Gets a value indicating whether this Font specifies a horizontal line through the font.
Style { get; }Gets style information for this Font.
Underline { get; }Gets a value indicating whether this Font is underlined.
Unit { get; }Gets the unit of measure for this Font.

Methods

NameDescription
DeepClone()Creates an exact deep copy of this Font.
override Equals(object)Indicates whether the specified object is a Font and has the same property values as this Font.
override GetHashCode()Gets the hash code for this Font.
override ToString()Returns a human-readable string representation of this Font.

See Also