XMConvertFloatToHalfStream
XMConvertHalfToFloatStream
XMMatrixDecompose
XMPlaneTransformStream
XMVector2TransformCoordStream
XMVector2TransformNormalStream
XMVector2TransformStream
XMVector3ProjectStream
XMVector3TransformCoordStream
XMVector3TransformNormalStream
XMVector3TransformStream
XMVector3UnprojectStream
XMVector4TransformStream
Expand Minimize

IDWriteFontFamily interface

Represents a family of related fonts.

Members

The IDWriteFontFamily interface inherits from IDWriteFontList. IDWriteFontFamily also has these types of members:

Methods

The IDWriteFontFamily interface has these methods.

MethodDescription
GetFamilyNames

Creates a localized strings object that contains the family names for the font family, indexed by locale name.

GetFirstMatchingFont

Gets the font that best matches the specified properties.

GetMatchingFonts

Gets a list of fonts in the font family ranked in order of how well they match the specified properties.

 

Remarks

A font family is a set of fonts that share the same family name, such as "Times New Roman", but that differ in features. These feature differences include style, such as italic, and weight, such as bold. The following illustration shows examples of fonts that are members of the "Times New Roman" font family.

Illustration of italic, bold, and bold italic text from the Times New Roman font family

An IDWriteFontFamily object can be retrieved from a font collection using the IDWriteFontCollection::GetFontFamily method shown in the following example. GetFontFamily takes a UINT32 index and returns the font family for the font at that index.


IDWriteFontFamily* pFontFamily = NULL;

// Get the font family.
if (SUCCEEDED(hr))
{
    hr = pFontCollection->GetFontFamily(i, &pFontFamily);
}


The font family name is used to specify the font family for text layout and text format objects. You can get a list of localized font family names from an IDWriteFontFamily object in the form of an IDWriteLocalizedStrings object by using the IDWriteFontFamily::GetFamilyNames method, as shown in the following code.


IDWriteLocalizedStrings* pFamilyNames = NULL;

// Get a list of localized strings for the family name.
if (SUCCEEDED(hr))
{
    hr = pFontFamily->GetFamilyNames(&pFamilyNames);
}


Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

Dwrite.h

Library

Dwrite.lib

DLL

Dwrite.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft