Skip to main content

FontFamily

Namespace: System.Drawing

Assembly: System.Drawing.Managed (4.0.0.0)

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

public class FontFamily : MarshalByRefObject, IDisposable

Constructors

Instance member FontFamily(name)

Initializes a new instance of the FontFamily class.

NameTypeDescription
nameStringThe name of the new FontFamily.

Instance member FontFamily(name, fontCollection)

Initializes a new instance of the FontFamily class from the specified generic font family.

NameTypeDescription
nameString
fontCollectionFontCollection

Instance member FontFamily(genericFamily)

Initializes a new instance of the FontFamily class from the specified generic font family.

NameTypeDescription
genericFamilyGenericFontFamiliesThe GenericFontFamilies from which to create the new FontFamily.

Properties

Static member Families

FontFamily[]: Gets an array that contains all the FontFamily objects associated with the current graphics context.

Static member GenericMonospace

FontFamily: Gets a generic monospace FontFamily.

Static member GenericSansSerif

FontFamily: Gets a generic sans serif FontFamily object.

Static member GenericSerif

FontFamily: Gets a generic serif FontFamily.

Instance member Name

String: Gets the name of this FontFamily.

Methods

Instance member Dispose()

Instance member GetCellAscent(style)

Returns the cell ascent, in design units, of the FontFamily of the specified style.

ParameterTypeDescription
styleFontStyleA FontStyle that contains style information for the font.

Returns: Int32. The cell ascent for this FontFamily that uses the specified FontStyle.

Instance member GetCellDescent(style)

Returns the cell descent, in design units, of the FontFamily of the specified style.

ParameterTypeDescription
styleFontStyleA FontStyle that contains style information for the font.

Returns: Int32. The cell descent for this FontFamily that uses the specified FontStyle.

Instance member GetEmHeight(style)

Returns the height, in design units, of the FontFamily of the specified style.

ParameterTypeDescription
styleFontStyleA FontStyle that contains style information for the font.

Returns: Int32. The height for this FontFamily that uses the specified FontStyle.

Instance member GetLineSpacing(style)

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.

ParameterTypeDescription
styleFontStyleThe FontStyle to apply.

Returns: Int32. The distance between two consecutive lines of text.

Instance member GetName(language)

Returns the name, in the specified language, of this FontFamily.

ParameterTypeDescription
languageInt32The language in which the name is returned.

Returns: String. A String that represents the name, in the specified language, of this FontFamily.

Instance member IsStyleAvailable(style)

Indicates whether the specified FontStyle enumeration is available.

ParameterTypeDescription
styleFontStyleThe FontStyle to test.

Returns: Boolean. if the specified FontStyle is available; otherwise, .