Class FontFamily

FontFamily class

Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.

public sealed class FontFamily : IDisposable

Constructors

NameDescription
FontFamily(string)Initializes a new instance of the FontFamily class with the specified name.
FontFamily(string, FontCollection)Initializes a new instance of the FontFamily class.

Properties

NameDescription
static GenericMonospace { get; }Gets a generic monospace FontFamily.
static GenericSansSerif { get; }Gets a generic sans serif FontFamily object.
static GenericSerif { get; }Gets a generic serif FontFamily.
Name { get; }Gets the name of this FontFamily.
static Families { get; }Gets an array that contains all the FontFamily objects associated with the current graphics context.

Methods

NameDescription
Dispose()Releases all resources used by this FontFamily.
override Equals(object)Indicates whether the specified object is a FontFamily and is identical to this FontFamily.
GetCellAscent(FontStyle)Returns the cell ascent, in design units, of the FontFamily of the specified style.
GetCellDescent(FontStyle)Returns the cell descent, in design units, of the FontFamily of the specified style.
GetEmHeight(FontStyle)Gets the height, in font design units, of the EM square for the specified style.
override GetHashCode()Gets a hash code for this FontFamily.
GetLineSpacing(FontStyle)Returns the line spacing, in design units, of the FontFamily of the specified style. The line spacing is the vertical distance between the base lines of two consecutive lines of text.
GetName(int)Returns the name, in the specified language, of this FontFamily.
IsStyleAvailable(FontStyle)Indicates whether the specified FontStyle enumeration is available.

See Also