10 #ifndef DWRITE_H_INCLUDED 11 #define DWRITE_H_INCLUDED 17 #ifndef DWRITE_NO_WINDOWS_H 19 #include <specstrings.h> 22 #endif // DWRITE_NO_WINDOWS_H 26 #ifndef DWRITE_DECLARE_INTERFACE 27 #define DWRITE_DECLARE_INTERFACE(iid) DECLSPEC_UUID(iid) DECLSPEC_NOVTABLE 31 #define DWRITE_EXPORT __declspec(dllimport) WINAPI 39 enum DWRITE_FONT_FILE_TYPE
44 DWRITE_FONT_FILE_TYPE_UNKNOWN,
49 DWRITE_FONT_FILE_TYPE_CFF,
54 DWRITE_FONT_FILE_TYPE_TRUETYPE,
59 DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION,
64 DWRITE_FONT_FILE_TYPE_TYPE1_PFM,
69 DWRITE_FONT_FILE_TYPE_TYPE1_PFB,
74 DWRITE_FONT_FILE_TYPE_VECTOR,
79 DWRITE_FONT_FILE_TYPE_BITMAP
87 enum DWRITE_FONT_FACE_TYPE
92 DWRITE_FONT_FACE_TYPE_CFF,
97 DWRITE_FONT_FACE_TYPE_TRUETYPE,
102 DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION,
107 DWRITE_FONT_FACE_TYPE_TYPE1,
112 DWRITE_FONT_FACE_TYPE_VECTOR,
117 DWRITE_FONT_FACE_TYPE_BITMAP,
122 DWRITE_FONT_FACE_TYPE_UNKNOWN
129 enum DWRITE_FONT_SIMULATIONS
134 DWRITE_FONT_SIMULATIONS_NONE = 0x0000,
139 DWRITE_FONT_SIMULATIONS_BOLD = 0x0001,
144 DWRITE_FONT_SIMULATIONS_OBLIQUE = 0x0002
147 #ifdef DEFINE_ENUM_FLAG_OPERATORS 148 DEFINE_ENUM_FLAG_OPERATORS(DWRITE_FONT_SIMULATIONS);
155 enum DWRITE_FONT_WEIGHT
160 DWRITE_FONT_WEIGHT_THIN = 100,
165 DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200,
170 DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200,
175 DWRITE_FONT_WEIGHT_LIGHT = 300,
180 DWRITE_FONT_WEIGHT_NORMAL = 400,
185 DWRITE_FONT_WEIGHT_REGULAR = 400,
190 DWRITE_FONT_WEIGHT_MEDIUM = 500,
195 DWRITE_FONT_WEIGHT_DEMI_BOLD = 600,
200 DWRITE_FONT_WEIGHT_SEMI_BOLD = 600,
205 DWRITE_FONT_WEIGHT_BOLD = 700,
210 DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800,
215 DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800,
220 DWRITE_FONT_WEIGHT_BLACK = 900,
225 DWRITE_FONT_WEIGHT_HEAVY = 900,
230 DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950,
235 DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950
243 enum DWRITE_FONT_STRETCH
248 DWRITE_FONT_STRETCH_UNDEFINED = 0,
253 DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1,
258 DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2,
263 DWRITE_FONT_STRETCH_CONDENSED = 3,
268 DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4,
273 DWRITE_FONT_STRETCH_NORMAL = 5,
278 DWRITE_FONT_STRETCH_MEDIUM = 5,
283 DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6,
288 DWRITE_FONT_STRETCH_EXPANDED = 7,
293 DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8,
298 DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9
305 enum DWRITE_FONT_STYLE
310 DWRITE_FONT_STYLE_NORMAL,
315 DWRITE_FONT_STYLE_OBLIQUE,
320 DWRITE_FONT_STYLE_ITALIC
327 enum DWRITE_INFORMATIONAL_STRING_ID
332 DWRITE_INFORMATIONAL_STRING_NONE,
337 DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE,
342 DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS,
347 DWRITE_INFORMATIONAL_STRING_TRADEMARK,
352 DWRITE_INFORMATIONAL_STRING_MANUFACTURER,
357 DWRITE_INFORMATIONAL_STRING_DESIGNER,
362 DWRITE_INFORMATIONAL_STRING_DESIGNER_URL,
367 DWRITE_INFORMATIONAL_STRING_DESCRIPTION,
372 DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL,
377 DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION,
382 DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL,
388 DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES,
393 DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES,
399 DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES,
404 DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES,
409 DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT
570 enum DWRITE_FACTORY_TYPE
576 DWRITE_FACTORY_TYPE_SHARED,
581 DWRITE_FACTORY_TYPE_ISOLATED
593 #define DWRITE_MAKE_OPENTYPE_TAG(a,b,c,d) ( \ 594 (static_cast<UINT32>(static_cast<UINT8>(d)) << 24) | \ 595 (static_cast<UINT32>(static_cast<UINT8>(c)) << 16) | \ 596 (static_cast<UINT32>(static_cast<UINT8>(b)) << 8) | \ 597 static_cast<UINT32>(static_cast<UINT8>(a))) 599 interface IDWriteFontFileStream;
610 interface DWRITE_DECLARE_INTERFACE("727cad4e-d6af-4c9e-8a08-d695b11caa49") IDWriteFontFileLoader :
public IUnknown
623 STDMETHOD(CreateStreamFromKey)(
624 __in_bcount(fontFileReferenceKeySize)
void const* fontFileReferenceKey,
625 UINT32 fontFileReferenceKeySize,
626 __out IDWriteFontFileStream** fontFileStream
635 interface DWRITE_DECLARE_INTERFACE("b2d9f3ec-c9fe-4a11-a2ec-d86208f7c0a2") IDWriteLocalFontFileLoader :
public IDWriteFontFileLoader
647 STDMETHOD(GetFilePathLengthFromKey)(
648 __in_bcount(fontFileReferenceKeySize)
void const* fontFileReferenceKey,
649 UINT32 fontFileReferenceKeySize,
650 __out UINT32* filePathLength
664 STDMETHOD(GetFilePathFromKey)(
665 __in_bcount(fontFileReferenceKeySize)
void const* fontFileReferenceKey,
666 UINT32 fontFileReferenceKeySize,
667 __out_ecount_z(filePathSize) WCHAR* filePath,
681 STDMETHOD(GetLastWriteTimeFromKey)(
682 __in_bcount(fontFileReferenceKeySize)
void const* fontFileReferenceKey,
683 UINT32 fontFileReferenceKeySize,
684 __out FILETIME* lastWriteTime
691 interface DWRITE_DECLARE_INTERFACE("6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0") IDWriteFontFileStream :
public IUnknown
707 STDMETHOD(ReadFileFragment)(
708 __deref_out_bcount(fragmentSize)
void const** fragmentStart,
711 __out
void** fragmentContext
718 STDMETHOD_(
void, ReleaseFileFragment)(
719 void* fragmentContext
735 STDMETHOD(GetFileSize)(
736 __out UINT64* fileSize
749 STDMETHOD(GetLastWriteTime)(
750 __out UINT64* lastWriteTime
757 interface DWRITE_DECLARE_INTERFACE("739d886a-cef5-47dc-8769-1a8b41bebbb0") IDWriteFontFile :
public IUnknown
768 STDMETHOD(GetReferenceKey)(
769 __deref_out_bcount(*fontFileReferenceKeySize)
void const** fontFileReferenceKey,
770 __out UINT32* fontFileReferenceKeySize
780 STDMETHOD(GetLoader)(
781 __out IDWriteFontFileLoader** fontFileLoader
804 __out BOOL* isSupportedFontType,
805 __out DWRITE_FONT_FILE_TYPE* fontFileType,
806 __out_opt DWRITE_FONT_FACE_TYPE* fontFaceType,
807 __out UINT32* numberOfFaces
815 #ifndef DWRITE_PIXEL_GEOMETRY_DEFINED 816 enum DWRITE_PIXEL_GEOMETRY
821 DWRITE_PIXEL_GEOMETRY_FLAT,
827 DWRITE_PIXEL_GEOMETRY_RGB,
833 DWRITE_PIXEL_GEOMETRY_BGR
835 #define DWRITE_PIXEL_GEOMETRY_DEFINED 841 enum DWRITE_RENDERING_MODE
846 DWRITE_RENDERING_MODE_DEFAULT,
852 DWRITE_RENDERING_MODE_ALIASED,
858 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC,
865 DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL,
871 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL,
878 DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC,
884 DWRITE_RENDERING_MODE_OUTLINE
927 interface DWRITE_DECLARE_INTERFACE("2f0da53a-2add-47cd-82ee-d9ec34688e75") IDWriteRenderingParams :
public IUnknown
933 STDMETHOD_(FLOAT, GetGamma)() PURE;
939 STDMETHOD_(FLOAT, GetEnhancedContrast)() PURE;
945 STDMETHOD_(FLOAT, GetClearTypeLevel)() PURE;
950 STDMETHOD_(DWRITE_PIXEL_GEOMETRY, GetPixelGeometry)() PURE;
955 STDMETHOD_(DWRITE_RENDERING_MODE, GetRenderingMode)() PURE;
959 interface ID2D1SimplifiedGeometrySink;
961 typedef ID2D1SimplifiedGeometrySink IDWriteGeometrySink;
968 interface DWRITE_DECLARE_INTERFACE("5f49804d-7024-4d43-bfa9-d25984f53849") IDWriteFontFace :
public IUnknown
973 STDMETHOD_(DWRITE_FONT_FACE_TYPE, GetType)() PURE;
987 __inout UINT32* numberOfFiles,
988 __out_ecount_opt(*numberOfFiles) IDWriteFontFile** fontFiles
995 STDMETHOD_(UINT32, GetIndex)() PURE;
1000 STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)() PURE;
1005 STDMETHOD_(BOOL, IsSymbolFont)() PURE;
1013 STDMETHOD_(
void, GetMetrics)(
1020 STDMETHOD_(UINT16, GetGlyphCount)() PURE;
1036 STDMETHOD(GetDesignGlyphMetrics)(
1037 __in_ecount(glyphCount) UINT16
const* glyphIndices,
1040 BOOL isSideways = FALSE
1057 STDMETHOD(GetGlyphIndices)(
1058 __in_ecount(codePointCount) UINT32
const* codePoints,
1059 UINT32 codePointCount,
1060 __out_ecount(codePointCount) UINT16* glyphIndices
1097 STDMETHOD(TryGetFontTable)(
1098 __in UINT32 openTypeTableTag,
1099 __deref_out_bcount(*tableSize)
const void** tableData,
1100 __out UINT32* tableSize,
1101 __out
void** tableContext,
1112 STDMETHOD_(
void, ReleaseFontTable)(
1113 __in
void* tableContext
1133 STDMETHOD(GetGlyphRunOutline)(
1135 __in_ecount(glyphCount) UINT16
const* glyphIndices,
1136 __in_ecount_opt(glyphCount) FLOAT
const* glyphAdvances,
1141 IDWriteGeometrySink* geometrySink
1163 STDMETHOD(GetRecommendedRenderingMode)(
1166 DWRITE_MEASURING_MODE measuringMode,
1167 IDWriteRenderingParams* renderingParams,
1168 __out DWRITE_RENDERING_MODE* renderingMode
1182 STDMETHOD(GetGdiCompatibleMetrics)(
1215 STDMETHOD(GetGdiCompatibleGlyphMetrics)(
1220 __in_ecount(glyphCount) UINT16
const* glyphIndices,
1223 BOOL isSideways = FALSE
1227 interface IDWriteFactory;
1228 interface IDWriteFontFileEnumerator;
1239 interface DWRITE_DECLARE_INTERFACE("cca920e4-52f0-492b-bfa8-29c72ee0a468") IDWriteFontCollectionLoader :
public IUnknown
1253 STDMETHOD(CreateEnumeratorFromKey)(
1254 IDWriteFactory* factory,
1255 __in_bcount(collectionKeySize)
void const* collectionKey,
1256 UINT32 collectionKeySize,
1257 __out IDWriteFontFileEnumerator** fontFileEnumerator
1265 interface DWRITE_DECLARE_INTERFACE("72755049-5ff7-435d-8348-4be97cfa6c7c") IDWriteFontFileEnumerator :
public IUnknown
1276 STDMETHOD(MoveNext)(
1277 __out BOOL* hasCurrentFile
1287 STDMETHOD(GetCurrentFontFile)(
1288 __out IDWriteFontFile** fontFile
1295 interface DWRITE_DECLARE_INTERFACE("08256209-099a-4b34-b86d-c22b110e7771") IDWriteLocalizedStrings :
public IUnknown
1300 STDMETHOD_(UINT32, GetCount)() PURE;
1312 STDMETHOD(FindLocaleName)(
1313 __in_z WCHAR
const* localeName,
1314 __out UINT32* index,
1326 STDMETHOD(GetLocaleNameLength)(
1328 __out UINT32* length
1341 STDMETHOD(GetLocaleName)(
1343 __out_ecount_z(size) WCHAR* localeName,
1355 STDMETHOD(GetStringLength)(
1357 __out UINT32* length
1370 STDMETHOD(GetString)(
1372 __out_ecount_z(size) WCHAR* stringBuffer,
1377 interface IDWriteFontFamily;
1378 interface IDWriteFont;
1383 interface DWRITE_DECLARE_INTERFACE("a84cee02-3eea-4eee-a827-87c1a02a0fcc") IDWriteFontCollection :
public IUnknown
1388 STDMETHOD_(UINT32, GetFontFamilyCount)() PURE;
1398 STDMETHOD(GetFontFamily)(
1400 __out IDWriteFontFamily** fontFamily
1412 STDMETHOD(FindFamilyName)(
1413 __in_z WCHAR
const* familyName,
1414 __out UINT32* index,
1427 STDMETHOD(GetFontFromFontFace)(
1428 IDWriteFontFace* fontFace,
1429 __out IDWriteFont** font
1436 interface DWRITE_DECLARE_INTERFACE("1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb") IDWriteFontList :
public IUnknown
1445 STDMETHOD(GetFontCollection)(
1446 __out IDWriteFontCollection** fontCollection
1452 STDMETHOD_(UINT32, GetFontCount)() PURE;
1464 __out IDWriteFont** font
1472 interface DWRITE_DECLARE_INTERFACE("da20d8ef-812a-4c43-9802-62ec4abd7add") IDWriteFontFamily :
public IDWriteFontList
1481 STDMETHOD(GetFamilyNames)(
1482 __out IDWriteLocalizedStrings** names
1495 STDMETHOD(GetFirstMatchingFont)(
1496 DWRITE_FONT_WEIGHT weight,
1497 DWRITE_FONT_STRETCH stretch,
1498 DWRITE_FONT_STYLE style,
1499 __out IDWriteFont** matchingFont
1512 STDMETHOD(GetMatchingFonts)(
1513 DWRITE_FONT_WEIGHT weight,
1514 DWRITE_FONT_STRETCH stretch,
1515 DWRITE_FONT_STYLE style,
1516 __out IDWriteFontList** matchingFonts
1523 interface DWRITE_DECLARE_INTERFACE("acd16696-8c14-4f5d-877e-fe3fc1d32737") IDWriteFont :
public IUnknown
1532 STDMETHOD(GetFontFamily)(
1533 __out IDWriteFontFamily** fontFamily
1539 STDMETHOD_(DWRITE_FONT_WEIGHT, GetWeight)() PURE;
1544 STDMETHOD_(DWRITE_FONT_STRETCH, GetStretch)() PURE;
1549 STDMETHOD_(DWRITE_FONT_STYLE, GetStyle)() PURE;
1554 STDMETHOD_(BOOL, IsSymbolFont)() PURE;
1563 STDMETHOD(GetFaceNames)(
1564 __out IDWriteLocalizedStrings** names
1577 STDMETHOD(GetInformationalStrings)(
1578 DWRITE_INFORMATIONAL_STRING_ID informationalStringID,
1579 __out IDWriteLocalizedStrings** informationalStrings,
1586 STDMETHOD_(DWRITE_FONT_SIMULATIONS, GetSimulations)() PURE;
1592 STDMETHOD_(
void, GetMetrics)(
1604 STDMETHOD(HasCharacter)(
1605 UINT32 unicodeValue,
1616 STDMETHOD(CreateFontFace)(
1617 __out IDWriteFontFace** fontFace
1624 enum DWRITE_READING_DIRECTION
1629 DWRITE_READING_DIRECTION_LEFT_TO_RIGHT,
1634 DWRITE_READING_DIRECTION_RIGHT_TO_LEFT
1640 enum DWRITE_FLOW_DIRECTION
1645 DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM
1652 enum DWRITE_TEXT_ALIGNMENT
1657 DWRITE_TEXT_ALIGNMENT_LEADING,
1662 DWRITE_TEXT_ALIGNMENT_TRAILING,
1667 DWRITE_TEXT_ALIGNMENT_CENTER
1674 enum DWRITE_PARAGRAPH_ALIGNMENT
1679 DWRITE_PARAGRAPH_ALIGNMENT_NEAR,
1684 DWRITE_PARAGRAPH_ALIGNMENT_FAR,
1689 DWRITE_PARAGRAPH_ALIGNMENT_CENTER
1695 enum DWRITE_WORD_WRAPPING
1700 DWRITE_WORD_WRAPPING_WRAP,
1706 DWRITE_WORD_WRAPPING_NO_WRAP
1712 enum DWRITE_LINE_SPACING_METHOD
1717 DWRITE_LINE_SPACING_METHOD_DEFAULT,
1723 DWRITE_LINE_SPACING_METHOD_UNIFORM
1729 enum DWRITE_TRIMMING_GRANULARITY
1734 DWRITE_TRIMMING_GRANULARITY_NONE,
1739 DWRITE_TRIMMING_GRANULARITY_CHARACTER,
1744 DWRITE_TRIMMING_GRANULARITY_WORD
1750 enum DWRITE_FONT_FEATURE_TAG
1752 DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661,
1753 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263,
1754 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263,
1755 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746c6163,
1756 DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163,
1757 DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706d6363,
1758 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696c63,
1759 DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063,
1760 DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363,
1761 DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563,
1762 DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664,
1763 DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696c64,
1764 DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865,
1765 DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266,
1766 DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766,
1767 DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666c6168,
1768 DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6e6c6168,
1769 DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746c6168,
1770 DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968,
1771 DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616e6b68,
1772 DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696c68,
1773 DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768,
1774 DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6f6a6f68,
1775 DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706a,
1776 DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706a,
1777 DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706a,
1778 DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706a,
1779 DWRITE_FONT_FEATURE_TAG_KERNING = 0x6e72656b,
1780 DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696c,
1781 DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6d756e6c,
1782 DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6c636f6c,
1783 DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6b72616d,
1784 DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6b72676d,
1785 DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6b6d6b6d,
1786 DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746c616e,
1787 DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6b636c6e,
1788 DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6d756e6f,
1789 DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6e64726f,
1790 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746c6170,
1791 DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370,
1792 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6d756e70,
1793 DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770,
1794 DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771,
1795 DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696c72,
1796 DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572,
1797 DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746c6173,
1798 DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666e6973,
1799 DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636d73,
1800 DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6c706d73,
1801 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373,
1802 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373,
1803 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373,
1804 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373,
1805 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373,
1806 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373,
1807 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373,
1808 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373,
1809 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373,
1810 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373,
1811 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373,
1812 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373,
1813 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373,
1814 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373,
1815 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373,
1816 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373,
1817 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373,
1818 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373,
1819 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373,
1820 DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373,
1821 DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573,
1822 DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573,
1823 DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773,
1824 DWRITE_FONT_FEATURE_TAG_TITLING = 0x6c746974,
1825 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6d616e74,
1826 DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6d756e74,
1827 DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274,
1828 DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774,
1829 DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696e75,
1830 DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6f72657a,
1910 interface IDWriteTypography;
1911 interface IDWriteInlineObject;
1919 interface DWRITE_DECLARE_INTERFACE("9c906818-31d7-4fd3-a151-7c5e225db55a") IDWriteTextFormat :
public IUnknown
1928 STDMETHOD(SetTextAlignment)(
1929 DWRITE_TEXT_ALIGNMENT textAlignment
1939 STDMETHOD(SetParagraphAlignment)(
1940 DWRITE_PARAGRAPH_ALIGNMENT paragraphAlignment
1950 STDMETHOD(SetWordWrapping)(
1951 DWRITE_WORD_WRAPPING wordWrapping
1961 STDMETHOD(SetReadingDirection)(
1962 DWRITE_READING_DIRECTION readingDirection
1972 STDMETHOD(SetFlowDirection)(
1973 DWRITE_FLOW_DIRECTION flowDirection
1983 STDMETHOD(SetIncrementalTabStop)(
1984 FLOAT incrementalTabStop
2001 STDMETHOD(SetTrimming)(
2003 IDWriteInlineObject* trimmingSign
2019 STDMETHOD(SetLineSpacing)(
2020 DWRITE_LINE_SPACING_METHOD lineSpacingMethod,
2028 STDMETHOD_(DWRITE_TEXT_ALIGNMENT, GetTextAlignment)() PURE;
2033 STDMETHOD_(DWRITE_PARAGRAPH_ALIGNMENT, GetParagraphAlignment)() PURE;
2038 STDMETHOD_(DWRITE_WORD_WRAPPING, GetWordWrapping)() PURE;
2043 STDMETHOD_(DWRITE_READING_DIRECTION, GetReadingDirection)() PURE;
2048 STDMETHOD_(DWRITE_FLOW_DIRECTION, GetFlowDirection)() PURE;
2053 STDMETHOD_(FLOAT, GetIncrementalTabStop)() PURE;
2063 STDMETHOD(GetTrimming)(
2065 __out IDWriteInlineObject** trimmingSign
2077 STDMETHOD(GetLineSpacing)(
2078 __out DWRITE_LINE_SPACING_METHOD* lineSpacingMethod,
2079 __out FLOAT* lineSpacing,
2080 __out FLOAT* baseline
2090 STDMETHOD(GetFontCollection)(
2091 __out IDWriteFontCollection** fontCollection
2097 STDMETHOD_(UINT32, GetFontFamilyNameLength)() PURE;
2107 STDMETHOD(GetFontFamilyName)(
2108 __out_ecount_z(nameSize) WCHAR* fontFamilyName,
2115 STDMETHOD_(DWRITE_FONT_WEIGHT, GetFontWeight)() PURE;
2120 STDMETHOD_(DWRITE_FONT_STYLE, GetFontStyle)() PURE;
2125 STDMETHOD_(DWRITE_FONT_STRETCH, GetFontStretch)() PURE;
2130 STDMETHOD_(FLOAT, GetFontSize)() PURE;
2135 STDMETHOD_(UINT32, GetLocaleNameLength)() PURE;
2145 STDMETHOD(GetLocaleName)(
2146 __out_ecount_z(nameSize) WCHAR* localeName,
2155 interface DWRITE_DECLARE_INTERFACE("55f1112b-1dc2-4b3c-9541-f46894ed85b6") IDWriteTypography : public IUnknown
2164 STDMETHOD(AddFontFeature)(
2171 STDMETHOD_(UINT32, GetFontFeatureCount)() PURE;
2181 STDMETHOD(GetFontFeature)(
2182 UINT32 fontFeatureIndex,
2187 enum DWRITE_SCRIPT_SHAPES
2192 DWRITE_SCRIPT_SHAPES_DEFAULT = 0,
2197 DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1
2200 #ifdef DEFINE_ENUM_FLAG_OPERATORS 2201 DEFINE_ENUM_FLAG_OPERATORS(DWRITE_SCRIPT_SHAPES);
2224 enum DWRITE_BREAK_CONDITION
2230 DWRITE_BREAK_CONDITION_NEUTRAL,
2237 DWRITE_BREAK_CONDITION_CAN_BREAK,
2243 DWRITE_BREAK_CONDITION_MAY_NOT_BREAK,
2249 DWRITE_BREAK_CONDITION_MUST_BREAK
2260 UINT8 breakConditionBefore : 2;
2265 UINT8 breakConditionAfter : 2;
2271 UINT8 isWhitespace : 1;
2277 UINT8 isSoftHyphen : 1;
2285 enum DWRITE_NUMBER_SUBSTITUTION_METHOD
2291 DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE,
2299 DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL,
2305 DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE,
2311 DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL,
2320 DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL
2326 interface DECLSPEC_UUID("14885CC9-BAB0-4f90-B6ED-5C366A2CD03D") DECLSPEC_NOVTABLE IDWriteNumberSubstitution :
public IUnknown
2339 UINT16 isShapedAlone : 1;
2344 UINT16 reserved : 15;
2357 UINT16 justification : 4;
2362 UINT16 isClusterStart : 1;
2367 UINT16 isDiacritic : 1;
2372 UINT16 isZeroWidthSpace : 1;
2377 UINT16 reserved : 9;
2391 interface DECLSPEC_UUID("688e1a58-5094-47c8-adc8-fbcea60ae92b") DECLSPEC_NOVTABLE IDWriteTextAnalysisSource :
public IUnknown
2419 STDMETHOD(GetTextAtPosition)(
2420 UINT32 textPosition,
2421 __out WCHAR
const** textString,
2422 __out UINT32* textLength
2444 STDMETHOD(GetTextBeforePosition)(
2445 UINT32 textPosition,
2446 __out WCHAR
const** textString,
2447 __out UINT32* textLength
2453 STDMETHOD_(DWRITE_READING_DIRECTION, GetParagraphReadingDirection)() PURE;
2467 STDMETHOD(GetLocaleName)(
2468 UINT32 textPosition,
2469 __out UINT32* textLength,
2470 __out_z WCHAR
const** localeName
2487 STDMETHOD(GetNumberSubstitution)(
2488 UINT32 textPosition,
2489 __out UINT32* textLength,
2490 __out IDWriteNumberSubstitution** numberSubstitution
2500 interface DECLSPEC_UUID("5810cd44-0ca0-4701-b3fa-bec5182ae4f6") DECLSPEC_NOVTABLE IDWriteTextAnalysisSink :
public IUnknown
2511 STDMETHOD(SetScriptAnalysis)(
2512 UINT32 textPosition,
2527 STDMETHOD(SetLineBreakpoints)(
2528 UINT32 textPosition,
2547 STDMETHOD(SetBidiLevel)(
2548 UINT32 textPosition,
2550 UINT8 explicitLevel,
2571 STDMETHOD(SetNumberSubstitution)(
2572 UINT32 textPosition,
2574 __notnull IDWriteNumberSubstitution* numberSubstitution
2581 interface DWRITE_DECLARE_INTERFACE("b7e6163e-7f46-43b4-84b3-e4e6249c365d") IDWriteTextAnalyzer :
public IUnknown
2595 STDMETHOD(AnalyzeScript)(
2596 IDWriteTextAnalysisSource* analysisSource,
2597 UINT32 textPosition,
2599 IDWriteTextAnalysisSink* analysisSink
2622 STDMETHOD(AnalyzeBidi)(
2623 IDWriteTextAnalysisSource* analysisSource,
2624 UINT32 textPosition,
2626 IDWriteTextAnalysisSink* analysisSink
2650 STDMETHOD(AnalyzeNumberSubstitution)(
2651 IDWriteTextAnalysisSource* analysisSource,
2652 UINT32 textPosition,
2654 IDWriteTextAnalysisSink* analysisSink
2685 STDMETHOD(AnalyzeLineBreakpoints)(
2686 IDWriteTextAnalysisSource* analysisSource,
2687 UINT32 textPosition,
2689 IDWriteTextAnalysisSink* analysisSink
2738 STDMETHOD(GetGlyphs)(
2739 __in_ecount(textLength) WCHAR
const* textString,
2741 IDWriteFontFace* fontFace,
2745 __in_z_opt WCHAR
const* localeName,
2746 __maybenull IDWriteNumberSubstitution* numberSubstitution,
2748 __in_ecount_opt(featureRanges) UINT32
const* featureRangeLengths,
2749 UINT32 featureRanges,
2750 UINT32 maxGlyphCount,
2751 __out_ecount(textLength) UINT16* clusterMap,
2753 __out_ecount(maxGlyphCount) UINT16* glyphIndices,
2755 __out UINT32* actualGlyphCount
2790 STDMETHOD(GetGlyphPlacements)(
2791 __in_ecount(textLength) WCHAR
const* textString,
2792 __in_ecount(textLength) UINT16
const* clusterMap,
2795 __in_ecount(glyphCount) UINT16
const* glyphIndices,
2798 IDWriteFontFace * fontFace,
2803 __in_z_opt WCHAR
const* localeName,
2805 __in_ecount_opt(featureRanges) UINT32
const* featureRangeLengths,
2806 UINT32 featureRanges,
2807 __out_ecount(glyphCount) FLOAT* glyphAdvances,
2852 STDMETHOD(GetGdiCompatibleGlyphPlacements)(
2853 __in_ecount(textLength) WCHAR
const* textString,
2854 __in_ecount(textLength) UINT16
const* clusterMap,
2857 __in_ecount(glyphCount) UINT16
const* glyphIndices,
2860 IDWriteFontFace * fontFace,
2868 __in_z_opt WCHAR
const* localeName,
2870 __in_ecount_opt(featureRanges) UINT32
const* featureRangeLengths,
2871 UINT32 featureRanges,
2872 __out_ecount(glyphCount) FLOAT* glyphAdvances,
2901 __field_ecount(glyphCount) UINT16 const* glyphIndices;
2906 __field_ecount_opt(glyphCount) FLOAT const* glyphAdvances;
2945 __field_ecount(stringLength) WCHAR const*
string;
2951 UINT32 stringLength;
2957 __field_ecount(stringLength) UINT16 const* clusterMap;
2963 UINT32 textPosition;
3137 UINT16 canWrapLineAfter : 1;
3142 UINT16 isWhitespace : 1;
3147 UINT16 isNewline : 1;
3152 UINT16 isSoftHyphen : 1;
3157 UINT16 isRightToLeft : 1;
3159 UINT16 padding : 11;
3344 interface IDWriteTextRenderer;
3351 interface DWRITE_DECLARE_INTERFACE("8339FDE3-106F-47ab-8373-1C6295EB10B3") IDWriteInlineObject :
public IUnknown
3369 __maybenull
void* clientDrawingContext,
3370 IDWriteTextRenderer* renderer,
3375 __maybenull IUnknown* clientDrawingEffect
3385 STDMETHOD(GetMetrics)(
3405 STDMETHOD(GetOverhangMetrics)(
3418 STDMETHOD(GetBreakConditions)(
3419 __out DWRITE_BREAK_CONDITION* breakConditionBefore,
3420 __out DWRITE_BREAK_CONDITION* breakConditionAfter
3427 interface DWRITE_DECLARE_INTERFACE("eaf3a2da-ecf4-4d24-b644-b34f6842024b") IDWritePixelSnapping :
public IUnknown
3438 STDMETHOD(IsPixelSnappingDisabled)(
3439 __maybenull
void* clientDrawingContext,
3440 __out BOOL* isDisabled
3452 STDMETHOD(GetCurrentTransform)(
3453 __maybenull
void* clientDrawingContext,
3467 STDMETHOD(GetPixelsPerDip)(
3468 __maybenull
void* clientDrawingContext,
3469 __out FLOAT* pixelsPerDip
3478 interface DWRITE_DECLARE_INTERFACE("ef8a8135-5cc6-45fe-8825-c5a0724eb819") IDWriteTextRenderer :
public IDWritePixelSnapping
3503 STDMETHOD(DrawGlyphRun)(
3504 __maybenull
void* clientDrawingContext,
3505 FLOAT baselineOriginX,
3506 FLOAT baselineOriginY,
3507 DWRITE_MEASURING_MODE measuringMode,
3509 __in DWRITE_GLYPH_RUN_DESCRIPTION
const* glyphRunDescription,
3510 __maybenull IUnknown* clientDrawingEffect
3540 STDMETHOD(DrawUnderline)(
3541 __maybenull
void* clientDrawingContext,
3542 FLOAT baselineOriginX,
3543 FLOAT baselineOriginY,
3545 __maybenull IUnknown* clientDrawingEffect
3571 STDMETHOD(DrawStrikethrough)(
3572 __maybenull
void* clientDrawingContext,
3573 FLOAT baselineOriginX,
3574 FLOAT baselineOriginY,
3576 __maybenull IUnknown* clientDrawingEffect
3599 STDMETHOD(DrawInlineObject)(
3600 __maybenull
void* clientDrawingContext,
3603 IDWriteInlineObject* inlineObject,
3606 __maybenull IUnknown* clientDrawingEffect
3616 interface DWRITE_DECLARE_INTERFACE("53737037-6d14-410b-9bfe-0b182bb70961") IDWriteTextLayout :
public IDWriteTextFormat
3625 STDMETHOD(SetMaxWidth)(
3636 STDMETHOD(SetMaxHeight)(
3648 STDMETHOD(SetFontCollection)(
3649 IDWriteFontCollection* fontCollection,
3661 STDMETHOD(SetFontFamilyName)(
3662 __in_z WCHAR
const* fontFamilyName,
3674 STDMETHOD(SetFontWeight)(
3675 DWRITE_FONT_WEIGHT fontWeight,
3687 STDMETHOD(SetFontStyle)(
3688 DWRITE_FONT_STYLE fontStyle,
3700 STDMETHOD(SetFontStretch)(
3701 DWRITE_FONT_STRETCH fontStretch,
3713 STDMETHOD(SetFontSize)(
3726 STDMETHOD(SetUnderline)(
3739 STDMETHOD(SetStrikethrough)(
3740 BOOL hasStrikethrough,
3756 STDMETHOD(SetDrawingEffect)(
3757 IUnknown* drawingEffect,
3774 STDMETHOD(SetInlineObject)(
3775 IDWriteInlineObject* inlineObject,
3787 STDMETHOD(SetTypography)(
3788 IDWriteTypography* typography,
3800 STDMETHOD(SetLocaleName)(
3801 __in_z WCHAR
const* localeName,
3808 STDMETHOD_(FLOAT, GetMaxWidth)() PURE;
3813 STDMETHOD_(FLOAT, GetMaxHeight)() PURE;
3824 STDMETHOD(GetFontCollection)(
3825 UINT32 currentPosition,
3826 __out IDWriteFontCollection** fontCollection,
3839 STDMETHOD(GetFontFamilyNameLength)(
3840 UINT32 currentPosition,
3841 __out UINT32* nameLength,
3855 STDMETHOD(GetFontFamilyName)(
3856 UINT32 currentPosition,
3857 __out_ecount_z(nameSize) WCHAR* fontFamilyName,
3871 STDMETHOD(GetFontWeight)(
3872 UINT32 currentPosition,
3873 __out DWRITE_FONT_WEIGHT* fontWeight,
3886 STDMETHOD(GetFontStyle)(
3887 UINT32 currentPosition,
3888 __out DWRITE_FONT_STYLE* fontStyle,
3901 STDMETHOD(GetFontStretch)(
3902 UINT32 currentPosition,
3903 __out DWRITE_FONT_STRETCH* fontStretch,
3916 STDMETHOD(GetFontSize)(
3917 UINT32 currentPosition,
3918 __out FLOAT* fontSize,
3931 STDMETHOD(GetUnderline)(
3932 UINT32 currentPosition,
3933 __out BOOL* hasUnderline,
3946 STDMETHOD(GetStrikethrough)(
3947 UINT32 currentPosition,
3948 __out BOOL* hasStrikethrough,
3961 STDMETHOD(GetDrawingEffect)(
3962 UINT32 currentPosition,
3963 __out IUnknown** drawingEffect,
3976 STDMETHOD(GetInlineObject)(
3977 UINT32 currentPosition,
3978 __out IDWriteInlineObject** inlineObject,
3991 STDMETHOD(GetTypography)(
3992 UINT32 currentPosition,
3993 __out IDWriteTypography** typography,
4006 STDMETHOD(GetLocaleNameLength)(
4007 UINT32 currentPosition,
4008 __out UINT32* nameLength,
4022 STDMETHOD(GetLocaleName)(
4023 UINT32 currentPosition,
4024 __out_ecount_z(nameSize) WCHAR* localeName,
4042 __maybenull
void* clientDrawingContext,
4043 IDWriteTextRenderer* renderer,
4064 STDMETHOD(GetLineMetrics)(
4066 UINT32 maxLineCount,
4067 __out UINT32* actualLineCount
4083 STDMETHOD(GetMetrics)(
4100 STDMETHOD(GetOverhangMetrics)(
4119 STDMETHOD(GetClusterMetrics)(
4121 UINT32 maxClusterCount,
4122 __out UINT32* actualClusterCount
4133 STDMETHOD(DetermineMinWidth)(
4134 __out FLOAT* minWidth
4157 STDMETHOD(HitTestPoint)(
4160 __out BOOL* isTrailingHit,
4161 __out BOOL* isInside,
4192 STDMETHOD(HitTestTextPosition)(
4193 UINT32 textPosition,
4195 __out FLOAT* pointX,
4196 __out FLOAT* pointY,
4240 STDMETHOD(HitTestTextRange)(
4241 UINT32 textPosition,
4246 UINT32 maxHitTestMetricsCount,
4247 __out UINT32* actualHitTestMetricsCount
4254 interface DWRITE_DECLARE_INTERFACE("5e5a32a3-8dff-4773-9ff6-0696eab77267") IDWriteBitmapRenderTarget : public IUnknown
4275 STDMETHOD(DrawGlyphRun)(
4276 FLOAT baselineOriginX,
4277 FLOAT baselineOriginY,
4278 DWRITE_MEASURING_MODE measuringMode,
4280 IDWriteRenderingParams* renderingParams,
4282 __out_opt RECT* blackBoxRect = NULL
4297 STDMETHOD_(HDC, GetMemoryDC)() PURE;
4306 STDMETHOD_(FLOAT, GetPixelsPerDip)() PURE;
4316 STDMETHOD(SetPixelsPerDip)(
4329 STDMETHOD(GetCurrentTransform)(
4342 STDMETHOD(SetCurrentTransform)(
4374 interface DWRITE_DECLARE_INTERFACE("1edd9491-9853-4299-898f-6432983b6f3a") IDWriteGdiInterop :
public IUnknown
4384 STDMETHOD(CreateFontFromLOGFONT)(
4385 __in LOGFONTW
const* logFont,
4386 __out IDWriteFont** font
4399 STDMETHOD(ConvertFontToLOGFONT)(
4401 __out LOGFONTW* logFont,
4402 __out BOOL* isSystemFont
4413 STDMETHOD(ConvertFontFaceToLOGFONT)(
4414 IDWriteFontFace* font,
4415 __out LOGFONTW* logFont
4428 STDMETHOD(CreateFontFaceFromHdc)(
4430 __out IDWriteFontFace** fontFace
4440 STDMETHOD(CreateBitmapRenderTarget)(
4444 __out IDWriteBitmapRenderTarget** renderTarget
4452 enum DWRITE_TEXTURE_TYPE
4458 DWRITE_TEXTURE_ALIASED_1x1,
4464 DWRITE_TEXTURE_CLEARTYPE_3x1
4470 #define DWRITE_ALPHA_MAX 255 4475 interface DWRITE_DECLARE_INTERFACE("7d97dbf7-e085-42d4-81e3-6a883bded118") IDWriteGlyphRunAnalysis :
public IUnknown
4488 STDMETHOD(GetAlphaTextureBounds)(
4489 DWRITE_TEXTURE_TYPE textureType,
4490 __out RECT* textureBounds
4506 STDMETHOD(CreateAlphaTexture)(
4507 DWRITE_TEXTURE_TYPE textureType,
4508 __in RECT
const* textureBounds,
4509 __out_bcount(bufferSize) BYTE* alphaValues,
4522 STDMETHOD(GetAlphaBlendParams)(
4523 IDWriteRenderingParams* renderingParams,
4524 __out FLOAT* blendGamma,
4525 __out FLOAT* blendEnhancedContrast,
4526 __out FLOAT* blendClearTypeLevel
4533 interface DWRITE_DECLARE_INTERFACE("b859ee5a-d838-4b5b-a2e8-1adc7d93db48") IDWriteFactory : public IUnknown
4546 STDMETHOD(GetSystemFontCollection)(
4547 __out IDWriteFontCollection** fontCollection,
4548 BOOL checkForUpdates = FALSE
4562 STDMETHOD(CreateCustomFontCollection)(
4563 IDWriteFontCollectionLoader* collectionLoader,
4564 __in_bcount(collectionKeySize) void const* collectionKey,
4565 UINT32 collectionKeySize,
4566 __out IDWriteFontCollection** fontCollection
4576 STDMETHOD(RegisterFontCollectionLoader)(
4577 IDWriteFontCollectionLoader* fontCollectionLoader
4587 STDMETHOD(UnregisterFontCollectionLoader)(
4588 IDWriteFontCollectionLoader* fontCollectionLoader
4604 STDMETHOD(CreateFontFileReference)(
4605 __in_z WCHAR const* filePath,
4606 __in_opt FILETIME const* lastWriteTime,
4607 __out IDWriteFontFile** fontFile
4629 STDMETHOD(CreateCustomFontFileReference)(
4630 __in_bcount(fontFileReferenceKeySize)
void const* fontFileReferenceKey,
4631 UINT32 fontFileReferenceKeySize,
4632 IDWriteFontFileLoader* fontFileLoader,
4633 __out IDWriteFontFile** fontFile
4650 STDMETHOD(CreateFontFace)(
4651 DWRITE_FONT_FACE_TYPE fontFaceType,
4652 UINT32 numberOfFiles,
4653 __in_ecount(numberOfFiles) IDWriteFontFile* const* fontFiles,
4655 DWRITE_FONT_SIMULATIONS fontFaceSimulationFlags,
4656 __out IDWriteFontFace** fontFace
4666 STDMETHOD(CreateRenderingParams)(
4667 __out IDWriteRenderingParams** renderingParams
4678 STDMETHOD(CreateMonitorRenderingParams)(
4680 __out IDWriteRenderingParams** renderingParams
4695 STDMETHOD(CreateCustomRenderingParams)(
4697 FLOAT enhancedContrast,
4698 FLOAT clearTypeLevel,
4699 DWRITE_PIXEL_GEOMETRY pixelGeometry,
4700 DWRITE_RENDERING_MODE renderingMode,
4701 __out IDWriteRenderingParams** renderingParams
4723 STDMETHOD(RegisterFontFileLoader)(
4724 IDWriteFontFileLoader* fontFileLoader
4745 STDMETHOD(UnregisterFontFileLoader)(
4746 IDWriteFontFileLoader* fontFileLoader
4763 STDMETHOD(CreateTextFormat)(
4764 __in_z WCHAR const* fontFamilyName,
4765 __maybenull IDWriteFontCollection* fontCollection,
4766 DWRITE_FONT_WEIGHT fontWeight,
4767 DWRITE_FONT_STYLE fontStyle,
4768 DWRITE_FONT_STRETCH fontStretch,
4770 __in_z WCHAR const* localeName,
4771 __out IDWriteTextFormat** textFormat
4781 STDMETHOD(CreateTypography)(
4782 __out IDWriteTypography** typography
4792 STDMETHOD(GetGdiInterop)(
4793 __out IDWriteGdiInterop** gdiInterop
4810 STDMETHOD(CreateTextLayout)(
4811 __in_ecount(stringLength) WCHAR const*
string,
4812 UINT32 stringLength,
4813 IDWriteTextFormat* textFormat,
4816 __out IDWriteTextLayout** textLayout
4843 STDMETHOD(CreateGdiCompatibleTextLayout)(
4844 __in_ecount(stringLength) WCHAR const*
string,
4845 UINT32 stringLength,
4846 IDWriteTextFormat* textFormat,
4852 __out IDWriteTextLayout** textLayout
4865 STDMETHOD(CreateEllipsisTrimmingSign)(
4866 IDWriteTextFormat* textFormat,
4867 __out IDWriteInlineObject** trimmingSign
4877 STDMETHOD(CreateTextAnalyzer)(
4878 __out IDWriteTextAnalyzer** textAnalyzer
4890 STDMETHOD(CreateNumberSubstitution)(
4891 __in DWRITE_NUMBER_SUBSTITUTION_METHOD substitutionMethod,
4892 __in_z WCHAR const* localeName,
4893 __in BOOL ignoreUserOverride,
4894 __out IDWriteNumberSubstitution** numberSubstitution
4915 STDMETHOD(CreateGlyphRunAnalysis)(
4919 DWRITE_RENDERING_MODE renderingMode,
4920 DWRITE_MEASURING_MODE measuringMode,
4921 FLOAT baselineOriginX,
4922 FLOAT baselineOriginY,
4923 __out IDWriteGlyphRunAnalysis** glyphRunAnalysis
4947 EXTERN_C HRESULT DWRITE_EXPORT DWriteCreateFactory(
4948 __in DWRITE_FACTORY_TYPE factoryType,
4950 __out IUnknown **factory
4954 #define FACILITY_DWRITE 0x898 4955 #define DWRITE_ERR_BASE 0x5000 4956 #define MAKE_DWRITE_HR(severity, code) MAKE_HRESULT(severity, FACILITY_DWRITE, (DWRITE_ERR_BASE + code)) 4957 #define MAKE_DWRITE_HR_ERR(code) MAKE_DWRITE_HR(SEVERITY_ERROR, code) 4962 #define DWRITE_E_FILEFORMAT MAKE_DWRITE_HR_ERR(0x000) 4967 #define DWRITE_E_UNEXPECTED MAKE_DWRITE_HR_ERR(0x001) 4972 #define DWRITE_E_NOFONT MAKE_DWRITE_HR_ERR(0x002) 4978 #define DWRITE_E_FILENOTFOUND MAKE_DWRITE_HR_ERR(0x003) 4983 #define DWRITE_E_FILEACCESS MAKE_DWRITE_HR_ERR(0x004) 4988 #define DWRITE_E_FONTCOLLECTIONOBSOLETE MAKE_DWRITE_HR_ERR(0x005) 4993 #define DWRITE_E_ALREADYREGISTERED MAKE_DWRITE_HR_ERR(0x006) FLOAT top
Top-most point of formatted text relative to layout box (excluding any glyph overhang).
Definition: DWrite.h:3179
UINT16 script
Zero-based index representation of writing system script.
Definition: DWrite.h:2212
UINT16 ascent
Ascent value of the font face in font design units.
Definition: DWrite.h:433
DWRITE_MEASURING_MODE measuringMode
The measuring mode can be useful to the renderer to determine how underlines are rendered, e.g.
Definition: DWrite.h:3074
UINT16 length
The number of text positions in the cluster.
Definition: DWrite.h:3132
FLOAT fontEmSize
Logical size of the font in DIPs, not points (equals 1/96 inch).
Definition: DWrite.h:2891
FLOAT baseline
Distance from the top of the object to the baseline where it is lined up with the adjacent text...
Definition: DWrite.h:3247
The DWRITE_CLUSTER_METRICS structure contains information about a glyph cluster.
Definition: DWrite.h:3122
INT32 topSideBearing
Specifies the vertical offset from the vertical origin to the top of the black box.
Definition: DWrite.h:516
UINT16 capHeight
Cap height value of the font face in font design units.
Definition: DWrite.h:455
DWRITE_FONT_FEATURE_TAG nameTag
The feature OpenType name identifier.
Definition: DWrite.h:1857
UINT32 lineCount
Total number of lines.
Definition: DWrite.h:3223
Holds the appropriate digits and numeric punctuation for a given locale.
Definition: DWrite.h:2333
The DWRITE_TEXT_RANGE structure specifies a range of text positions where format is applied...
Definition: DWrite.h:1836
UINT16 xHeight
x-height value of the font face in font design units.
Definition: DWrite.h:461
INT32 rightSideBearing
Specifies the X offset from the right edge of the black box to the origin of the next glyph when writ...
Definition: DWrite.h:510
__nullterminated WCHAR const * localeName
Locale of the text the underline is being drawn under.
Definition: DWrite.h:3016
FLOAT height
Geometry's height.
Definition: DWrite.h:3325
FLOAT offset
Offset of the stikethrough from the baseline.
Definition: DWrite.h:3048
FLOAT width
Width of the strikethrough, measured parallel to the baseline.
Definition: DWrite.h:3035
__nullterminated WCHAR const * localeName
Locale of the range.
Definition: DWrite.h:3067
DWRITE_MEASURING_MODE measuringMode
The measuring mode can be useful to the renderer to determine how underlines are rendered, e.g.
Definition: DWrite.h:3023
UINT32 advanceWidth
Specifies the X offset from the origin of the current glyph to the origin of the next glyph when writ...
Definition: DWrite.h:504
FLOAT left
The distance from the left-most visible DIP to its left alignment edge.
Definition: DWrite.h:3273
UINT16 underlineThickness
The suggested underline thickness value of the font face in font design units.
Definition: DWrite.h:473
FLOAT baseline
Distance from the top of the line to its baseline.
Definition: DWrite.h:3110
__nullterminated WCHAR const * localeName
The locale name associated with this run.
Definition: DWrite.h:2940
INT16 lineGap
Line gap in font design units.
Definition: DWrite.h:448
FLOAT width
Width of the inline object.
Definition: DWrite.h:3236
FLOAT thickness
Thickness of the strikethrough, measured perpendicular to the baseline.
Definition: DWrite.h:3041
FLOAT ascenderOffset
Offset in the ascent direction, i.e., the direction ascenders point.
Definition: DWrite.h:557
FLOAT m11
Horizontal scaling / cosine of rotation
Definition: DWrite.h:896
BOOL isTrimmed
The line is trimmed.
Definition: DWrite.h:3115
INT32 verticalOriginY
Specifies the Y coordinate of a glyph's vertical origin, in the font's design coordinate system...
Definition: DWrite.h:538
FLOAT thickness
Thickness of the underline, measured perpendicular to the baseline.
Definition: DWrite.h:2981
FLOAT runHeight
Height of the tallest run where the underline applies.
Definition: DWrite.h:2993
The DWRITE_MATRIX structure specifies the graphics transform to be applied to rendered glyphs...
Definition: DWrite.h:891
UINT32 bidiLevel
Bidi level of text positions enclosed within the geometry.
Definition: DWrite.h:3330
FLOAT layoutHeight
Initial height given to the layout.
Definition: DWrite.h:3210
BOOL isText
Geometry encloses text?
Definition: DWrite.h:3335
FLOAT layoutWidth
Initial width given to the layout.
Definition: DWrite.h:3204
UINT16 descent
Descent value of the font face in font design units.
Definition: DWrite.h:439
FLOAT height
Height of the line as measured from top to bottom.
Definition: DWrite.h:3105
The DWRITE_GLYPH_RUN_DESCRIPTION structure contains additional properties related to those in DWRITE_...
Definition: DWrite.h:2935
__notnull IDWriteFontFace * fontFace
The physical font face to draw with.
Definition: DWrite.h:2886
Defines a set of typographic features to be applied during shaping.
Definition: DWrite.h:1874
INT32 leftSideBearing
Specifies the X offset from the glyph origin to the left edge of the black box.
Definition: DWrite.h:499
UINT32 delimiter
Character code used as the delimiter signaling the beginning of the portion of text to be preserved...
Definition: DWrite.h:1901
UINT16 strikethroughThickness
The suggested strikethrough thickness value of the font face in font design units.
Definition: DWrite.h:485
The DWRITE_LINE_METRICS structure contains information about a formatted line of text.
Definition: DWrite.h:3081
FLOAT m21
Horizontal shear / negative sine of rotation
Definition: DWrite.h:906
Overall metrics associated with text after layout.
Definition: DWrite.h:3167
The interface implemented by the text analyzer's client to provide text to the analyzer.
Definition: DWrite.h:2881
FLOAT bottom
The distance from the bottom-most visible DIP to its bottom alignment edge.
Definition: DWrite.h:3288
FLOAT height
Height of the inline object as measured from top to bottom.
Definition: DWrite.h:3241
FLOAT right
The distance from the right-most visible DIP to its right alignment edge.
Definition: DWrite.h:3283
UINT32 textPosition
First text position within the geometry.
Definition: DWrite.h:3300
FLOAT left
Left-most point of formatted text relative to layout box (excluding any glyph overhang).
Definition: DWrite.h:3173
DWRITE_FLOW_DIRECTION flowDirection
Flow direction of the text associated with the underline.
Definition: DWrite.h:3007
UINT32 maxBidiReorderingDepth
The maximum reordering count of any line of text, used to calculate the most number of hit-testing bo...
Definition: DWrite.h:3218
FLOAT m22
Vertical scaling / cosine of rotation
Definition: DWrite.h:911
The DWRITE_OVERHANG_METRICS structure holds how much any visible pixels (in DIPs) overshoot each side...
Definition: DWrite.h:3268
Line breakpoint characteristics of a character.
Definition: DWrite.h:2255
FLOAT advanceOffset
Offset in the advance direction of the run.
Definition: DWrite.h:551
FLOAT top
The distance from the top-most visible DIP to its top alignment edge.
Definition: DWrite.h:3278
BOOL supportsSideways
Flag indicating whether the object is to be placed upright or alongside the text baseline for vertica...
Definition: DWrite.h:3253
FLOAT width
Geometry's width.
Definition: DWrite.h:3320
UINT32 startPosition
The start text position of the range.
Definition: DWrite.h:1841
Optional adjustment to a glyph's position.
Definition: DWrite.h:545
The DWRITE_FONT_FEATURE structure specifies properties used to identify and execute typographic featu...
Definition: DWrite.h:1852
FLOAT left
Left position of the top-left coordinate of the geometry.
Definition: DWrite.h:3310
UINT32 trailingWhitespaceLength
The number of whitespace positions at the end of the line.
Definition: DWrite.h:3093
DWRITE_READING_DIRECTION readingDirection
Reading direction of the text associated with the underline.
Definition: DWrite.h:3000
UINT32 parameter
Execution parameter of the feature.
Definition: DWrite.h:1866
INT16 strikethroughPosition
The strikethrough position value of the font face in font design units.
Definition: DWrite.h:480
Geometry enclosing of text positions.
Definition: DWrite.h:3295
UINT32 length
The number of text positions in the range.
Definition: DWrite.h:1846
The DWRITE_STRIKETHROUGH structure contains about the size and placement of strickthroughs.
Definition: DWrite.h:3030
The DWRITE_UNDERLINE structure contains about the size and placement of underlines.
Definition: DWrite.h:2970
UINT32 delimiterCount
How many occurences of the delimiter to step back.
Definition: DWrite.h:1906
INT32 bottomSideBearing
Specifies the vertical distance from the black box's bottom edge to the advance height.
Definition: DWrite.h:531
UINT16 designUnitsPerEm
The number of font design units per em unit.
Definition: DWrite.h:427
INT16 underlinePosition
The underline position value of the font face in font design units.
Definition: DWrite.h:468
Properties describing the geometric measurement of an application-defined inline object.
Definition: DWrite.h:3231
FLOAT height
The height of the formatted text.
Definition: DWrite.h:3197
The DWRITE_GLYPH_METRICS structure specifies the metrics of an individual glyph.
Definition: DWrite.h:492
Shaping output properties per output glyph.
Definition: DWrite.h:2350
DWRITE_READING_DIRECTION readingDirection
Reading direction of the text associated with the strikethrough.
Definition: DWrite.h:3055
BOOL isTrimmed
Range is trimmed.
Definition: DWrite.h:3340
FLOAT width
Width of the underline, measured parallel to the baseline.
Definition: DWrite.h:2975
DWRITE_FLOW_DIRECTION flowDirection
Flow direction of the text associated with the strikethrough.
Definition: DWrite.h:3062
FLOAT m12
Vertical shear / sine of rotation
Definition: DWrite.h:901
Association of text and its writing system script as well as some display attributes.
Definition: DWrite.h:2207
FLOAT dx
Horizontal shift (always orthogonal regardless of rotation)
Definition: DWrite.h:916
FLOAT widthIncludingTrailingWhitespace
The width of the formatted text taking into account the trailing whitespace at the end of each line...
Definition: DWrite.h:3191
UINT32 length
Number of text positions within the geometry.
Definition: DWrite.h:3305
UINT32 featureCount
The number of features.
Definition: DWrite.h:1884
FLOAT width
The width of the formatted text ignoring trailing whitespace at the end of each line.
Definition: DWrite.h:3185
FLOAT width
The total advance width of all glyphs in the cluster.
Definition: DWrite.h:3127
UINT32 glyphCount
The number of glyphs.
Definition: DWrite.h:2896
DWRITE_SCRIPT_SHAPES shapes
Additional shaping requirement of text.
Definition: DWrite.h:2217
The DWRITE_FONT_METRICS structure specifies the metrics of a font face that are applicable to all gly...
Definition: DWrite.h:417
FLOAT dy
Vertical shift (always orthogonal regardless of rotation)
Definition: DWrite.h:921
UINT32 newlineLength
The number of characters in the newline sequence at the end of the line.
Definition: DWrite.h:3100
DWRITE_TRIMMING_GRANULARITY granularity
Text granularity of which trimming applies.
Definition: DWrite.h:1895
UINT32 advanceHeight
Specifies the Y offset from the vertical origin of the current glyph to the vertical origin of the ne...
Definition: DWrite.h:524
FLOAT top
Top position of the top-left coordinate of the geometry.
Definition: DWrite.h:3315
FLOAT offset
Offset of the underline from the baseline.
Definition: DWrite.h:2988
The DWRITE_TRIMMING structure specifies the trimming option for text overflowing the layout box...
Definition: DWrite.h:1890
UINT32 length
The number of total text positions in the line.
Definition: DWrite.h:3087