IDWriteFont1

<summary> The IDWriteFont interface represents a physical font in a font collection. </summary>

Members

Functions

GetMetrics
void GetMetrics(DWRITE_FONT_METRICS1* fontMetrics)

<summary> Gets common metrics for the font in design units. These metrics are applicable to all the glyphs within a font, and are used by applications for layout calculations. </summary> <param name="fontMetrics">Metrics structure to fill in.</param>

GetPanose
void GetPanose(DWRITE_PANOSE* panose)

<summary> Gets the PANOSE values from the font, used for font selection and matching. </summary> <param name="panose">PANOSE structure to fill in.</param> <remarks> The function does not simulate these, such as substituting a weight or proportion inferred on other values. If the font does not specify them, they are all set to 'any' (0). </remarks>

GetUnicodeRanges
HRESULT GetUnicodeRanges(UINT32 maxRangeCount, DWRITE_UNICODE_RANGE* unicodeRanges, UINT32* actualRangeCount)

<summary> Returns the list of character ranges supported by the font, which is useful for scenarios like character picking, glyph display, and efficient font selection lookup. This is similar to GDI's GetFontUnicodeRanges, except that it returns the full Unicode range, not just 16-bit UCS-2. </summary> <param name="maxRangeCount">Maximum number of character ranges passed in from the client.</param> <param name="unicodeRanges">Array of character ranges.</param> <param name="actualRangeCount">Actual number of character ranges, regardless of the maximum count.</param> <remarks> These ranges are from the cmap, not the OS/2::ulCodePageRange1. </remarks> <returns> Standard HRESULT error code. </returns>

IsMonospacedFont
BOOL IsMonospacedFont()

<summary> Returns true if the font is monospaced, meaning its characters are the same fixed-pitch width (non-proportional). </summary>

Inherited Members

From IDWriteFont

GetFontFamily
HRESULT GetFontFamily(IDWriteFontFamily* fontFamily)

<summary> Gets the font family to which the specified font belongs. </summary> <param name="fontFamily">Receives a pointer to the font family object.</param> <returns> Standard HRESULT error code. </returns>

GetWeight
DWRITE_FONT_WEIGHT GetWeight()

<summary> Gets the weight of the specified font. </summary>

GetStretch
DWRITE_FONT_STRETCH GetStretch()

<summary> Gets the stretch (aka. width) of the specified font. </summary>

GetStyle
DWRITE_FONT_STYLE GetStyle()

<summary> Gets the style (aka. slope) of the specified font. </summary>

IsSymbolFont
BOOL IsSymbolFont()

<summary> Returns TRUE if the font is a symbol font or FALSE if not. </summary>

GetFaceNames
HRESULT GetFaceNames(IDWriteLocalizedStrings* names)

<summary> Gets a localized strings collection containing the face names for the font (e.g., Regular or Bold), indexed by locale name. </summary> <param name="names">Receives a pointer to the newly created localized strings object.</param> <returns> Standard HRESULT error code. </returns>

GetInformationalStrings
HRESULT GetInformationalStrings(DWRITE_INFORMATIONAL_STRING_ID informationalStringID, IDWriteLocalizedStrings* informationalStrings, BOOL* exists)

<summary> Gets a localized strings collection containing the specified informational strings, indexed by locale name. </summary> <param name="informationalStringID">Identifies the string to get.</param> <param name="informationalStrings">Receives a pointer to the newly created localized strings object.</param> <param name="exists">Receives the value TRUE if the font contains the specified string ID or FALSE if not.</param> <returns> Standard HRESULT error code. If the font does not contain the specified string, the return value is S_OK but informationalStrings receives a NULL pointer and exists receives the value FALSE. </returns>

GetSimulations
DWRITE_FONT_SIMULATIONS GetSimulations()

<summary> Gets a value that indicates what simulation are applied to the specified font. </summary>

GetMetrics
void GetMetrics(DWRITE_FONT_METRICS* fontMetrics)

<summary> Gets the metrics for the font. </summary> <param name="fontMetrics">Receives the font metrics.</param>

HasCharacter
HRESULT HasCharacter(UINT32 unicodeValue, BOOL* exists)

<summary> Determines whether the font supports the specified character. </summary> <param name="unicodeValue">Unicode (UCS-4) character value.</param> <param name="exists">Receives the value TRUE if the font supports the specified character or FALSE if not.</param> <returns> Standard HRESULT error code. </returns>

CreateFontFace
HRESULT CreateFontFace(IDWriteFontFace* fontFace)

<summary> Creates a font face object for the font. </summary> <param name="fontFace">Receives a pointer to the newly created font face object.</param> <returns> Standard HRESULT error code. </returns>

Meta