FontFamily class

Applies to: desktop apps only

This FontFamily class encapsulates a set of fonts that make up a font family. A font family is a group of fonts that have the same typeface but different styles.

Members

The FontFamily class inherits from GdiplusBase. FontFamily also has these types of members:

Constructors

The FontFamily class has these constructors.

ConstructorDescription
FontFamily::FontFamily()

Creates an empty FontFamily::FontFamily object.

FontFamily::FontFamily(WCHAR*,FontCollection*)

Creates a FontFamily::FontFamily object based on a specified font family.

 

Methods

The FontFamily class has these methods.

MethodDescription
FontFamily::Clone

The FontFamily::Clone method creates a new FontFamily object based on this FontFamily object.

FontFamily::GenericMonospace

The FontFamily::GenericMonospace method gets a FontFamily object that specifies a generic monospace typeface.

FontFamily::GenericSansSerif

The FontFamily::GenericSansSerif method gets a FontFamily object that specifies a generic sans serif typeface.

FontFamily::GenericSerif

The FontFamily::GenericSerif method gets a FontFamily object that represents a generic serif typeface.

FontFamily::GetCellAscent

The FontFamily::GetCellAscent method gets the cell ascent, in design units, of this font family for the specified style or style combination.

FontFamily::GetCellDescent

The FontFamily::GetCellDescent method gets the cell descent, in design units, of this font family for the specified style or style combination.

FontFamily::GetEmHeight

The FontFamily::GetEmHeight method gets the size (commonly called em size or em height), in design units, of this font family.

FontFamily::GetFamilyName

The FontFamily::GetFamilyName method gets the name of this font family.

FontFamily::GetLastStatus

The FontFamily::GetLastStatus method returns a value that indicates the nature of this FontFamily object's most recent method failure.

FontFamily::GetLineSpacing

The FontFamily::GetLineSpacing method gets the line spacing, in design units, of this font family for the specified style or style combination. The line spacing is the vertical distance between the base lines of two consecutive lines of text.

FontFamily::IsAvailable

The FontFamily::IsAvailable method determines whether this FontFamily object was created successfully.

FontFamily::IsStyleAvailable

The FontFamily::IsStyleAvailable method determines whether the specified style is available for this font family.

 

Remarks

Only regular, bold, italic, and bold italic are abstracted into the family, other styles, such as Narrow or Black, are considered separate font families. For example Times New Roman is a font family. The Times New Roman font family includes regular, bold, italic, and bold italic.

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show: