UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:dwrite_1.IDWriteFont1.GetUnicodeRanges |
IDWriteFont1::GetUnicodeRanges (dwrite_1.h) |
Retrieves the list of character ranges supported by a font. |
|
directwrite\idwritefont1_getunicoderanges.htm |
DirectWrite |
B92E8500-AF63-43F2-A581-688B2CFCF2BF |
12/05/2018 |
GetUnicodeRanges, GetUnicodeRanges method [Direct Write], GetUnicodeRanges method [Direct Write],IDWriteFont1 interface, IDWriteFont1 interface [Direct Write],GetUnicodeRanges method, IDWriteFont1.GetUnicodeRanges, IDWriteFont1::GetUnicodeRanges, directwrite.idwritefont1_getunicoderanges, dwrite_1/IDWriteFont1::GetUnicodeRanges |
dwrite_1.h |
Windows |
Windows 8 and Platform Update for Windows 7 [desktop apps \| UWP apps] |
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps \| UWP apps] |
Dwrite_1.lib |
Dwrite_1.dll |
Windows |
19H1 |
|
|
|
|
|
|
Retrieves the list of character ranges supported by a font.
Type: UINT32
The maximum number of character ranges passed in from the client.
Type: DWRITE_UNICODE_RANGE*
An array of DWRITE_UNICODE_RANGE structures that are filled with the character ranges.
Type: UINT32*
A pointer to the actual number of character ranges, regardless of the maximum count.
Type: HRESULT
This method can return one of these values.
Return value | Description |
---|---|
|
The method executed successfully. |
|
The buffer is too small. The actualRangeCount was more than the maxRangeCount. |
The list of character ranges supported by a font, is useful for scenarios like character picking, glyph display, and efficient font selection lookup. GetUnicodeRanges is similar to GDI's GetFontUnicodeRanges, except that it returns the full Unicode range, not just 16-bit UCS-2.
These ranges are from the cmap, not the OS/2::ulCodePageRange1.
If this method is unavailable, you can use the IDWriteFontFace::GetGlyphIndices method to check for missing glyphs. The method returns the 0 index for glyphs that aren't present in the font.
The IDWriteFont::HasCharacter method is often simpler in cases where you need to check a single character or a series of single characters in succession, such as in font fallback.