FontFamily
System.Drawing.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, IDisposablePublic Class FontFamily
Inherits MarshalByRefObject
Implements IDisposableConstructors
FontFamily(name)
Initializes a new instance of the FontFamily class.
FontFamily(name, fontCollection)
Initializes a new instance of the FontFamily class from the specified generic font family.
FontFamily(genericFamily)
Initializes a new instance of the FontFamily class from the specified generic font family.
Properties
Families
FontFamily[]: Gets an array that contains all the FontFamily objects associated with the current graphics context.
GenericMonospace
FontFamily: Gets a generic monospace FontFamily.
GenericSansSerif
FontFamily: Gets a generic sans serif FontFamily object.
GenericSerif
FontFamily: Gets a generic serif FontFamily.
Name
String: Gets the name of this FontFamily.
Methods
Dispose()
GetCellAscent(style)
Returns the cell ascent, in design units, of the FontFamily of the specified style.
Returns: Int32. The cell ascent for this FontFamily that uses the specified FontStyle.
GetCellDescent(style)
Returns the cell descent, in design units, of the FontFamily of the specified style.
Returns: Int32. The cell descent for this FontFamily that uses the specified FontStyle.
GetEmHeight(style)
Returns the height, in design units, of the FontFamily of the specified style.
Returns: Int32. The height for this FontFamily that uses the specified FontStyle.
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.
Returns: Int32. The distance between two consecutive lines of text.
GetName(language)
Returns the name, in the specified language, of this FontFamily.
Returns: String. A String that represents the name, in the specified language, of this FontFamily.
IsStyleAvailable(style)
Indicates whether the specified FontStyle enumeration is available.
Returns: Boolean. if the specified FontStyle is available; otherwise, .
Last updated
Was this helpful?