José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 1 | ########################################################################## |
| 2 | # |
| 3 | # Copyright 2011 Jose Fonseca |
| 4 | # All Rights Reserved. |
| 5 | # |
| 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | # of this software and associated documentation files (the "Software"), to deal |
| 8 | # in the Software without restriction, including without limitation the rights |
| 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | # copies of the Software, and to permit persons to whom the Software is |
| 11 | # furnished to do so, subject to the following conditions: |
| 12 | # |
| 13 | # The above copyright notice and this permission notice shall be included in |
| 14 | # all copies or substantial portions of the Software. |
| 15 | # |
| 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | # THE SOFTWARE. |
| 23 | # |
| 24 | ##########################################################################/ |
| 25 | |
| 26 | |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 27 | from .winapi import * |
| 28 | from .dcommon import * |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 29 | |
| 30 | |
| 31 | ID2D1SimplifiedGeometrySink = Interface("ID2D1SimplifiedGeometrySink", IUnknown) |
| 32 | IDWriteGeometrySink = Alias("IDWriteGeometrySink", ID2D1SimplifiedGeometrySink) |
| 33 | |
| 34 | IDWriteFontFileLoader = Interface("IDWriteFontFileLoader", IUnknown) |
| 35 | IDWriteLocalFontFileLoader = Interface("IDWriteLocalFontFileLoader", IDWriteFontFileLoader) |
| 36 | IDWriteFontFileStream = Interface("IDWriteFontFileStream", IUnknown) |
| 37 | IDWriteFontFile = Interface("IDWriteFontFile", IUnknown) |
| 38 | IDWriteRenderingParams = Interface("IDWriteRenderingParams", IUnknown) |
| 39 | IDWriteFontFace = Interface("IDWriteFontFace", IUnknown) |
| 40 | IDWriteFontCollectionLoader = Interface("IDWriteFontCollectionLoader", IUnknown) |
| 41 | IDWriteFontFileEnumerator = Interface("IDWriteFontFileEnumerator", IUnknown) |
| 42 | IDWriteLocalizedStrings = Interface("IDWriteLocalizedStrings", IUnknown) |
| 43 | IDWriteFontCollection = Interface("IDWriteFontCollection", IUnknown) |
| 44 | IDWriteFontList = Interface("IDWriteFontList", IUnknown) |
| 45 | IDWriteFontFamily = Interface("IDWriteFontFamily", IDWriteFontList) |
| 46 | IDWriteFont = Interface("IDWriteFont", IUnknown) |
| 47 | IDWriteTextFormat = Interface("IDWriteTextFormat", IUnknown) |
| 48 | IDWriteTypography = Interface("IDWriteTypography", IUnknown) |
| 49 | IDWriteNumberSubstitution = Interface("IDWriteNumberSubstitution", IUnknown) |
| 50 | IDWriteTextAnalysisSource = Interface("IDWriteTextAnalysisSource", IUnknown) |
| 51 | IDWriteTextAnalysisSink = Interface("IDWriteTextAnalysisSink", IUnknown) |
| 52 | IDWriteTextAnalyzer = Interface("IDWriteTextAnalyzer", IUnknown) |
| 53 | IDWriteInlineObject = Interface("IDWriteInlineObject", IUnknown) |
| 54 | IDWritePixelSnapping = Interface("IDWritePixelSnapping", IUnknown) |
| 55 | IDWriteTextRenderer = Interface("IDWriteTextRenderer", IDWritePixelSnapping) |
| 56 | IDWriteTextLayout = Interface("IDWriteTextLayout", IDWriteTextFormat) |
| 57 | IDWriteBitmapRenderTarget = Interface("IDWriteBitmapRenderTarget", IUnknown) |
| 58 | IDWriteGdiInterop = Interface("IDWriteGdiInterop", IUnknown) |
| 59 | IDWriteGlyphRunAnalysis = Interface("IDWriteGlyphRunAnalysis", IUnknown) |
| 60 | IDWriteFactory = Interface("IDWriteFactory", IUnknown) |
| 61 | |
| 62 | |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 63 | DWRITE_FONT_FILE_TYPE = Enum("DWRITE_FONT_FILE_TYPE", [ |
| 64 | "DWRITE_FONT_FILE_TYPE_UNKNOWN", |
| 65 | "DWRITE_FONT_FILE_TYPE_CFF", |
| 66 | "DWRITE_FONT_FILE_TYPE_TRUETYPE", |
| 67 | "DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION", |
| 68 | "DWRITE_FONT_FILE_TYPE_TYPE1_PFM", |
| 69 | "DWRITE_FONT_FILE_TYPE_TYPE1_PFB", |
| 70 | "DWRITE_FONT_FILE_TYPE_VECTOR", |
| 71 | "DWRITE_FONT_FILE_TYPE_BITMAP", |
| 72 | ]) |
| 73 | |
| 74 | DWRITE_FONT_FACE_TYPE = Enum("DWRITE_FONT_FACE_TYPE", [ |
| 75 | "DWRITE_FONT_FACE_TYPE_CFF", |
| 76 | "DWRITE_FONT_FACE_TYPE_TRUETYPE", |
| 77 | "DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION", |
| 78 | "DWRITE_FONT_FACE_TYPE_TYPE1", |
| 79 | "DWRITE_FONT_FACE_TYPE_VECTOR", |
| 80 | "DWRITE_FONT_FACE_TYPE_BITMAP", |
| 81 | "DWRITE_FONT_FACE_TYPE_UNKNOWN", |
| 82 | ]) |
| 83 | |
Jose Fonseca | 8a4c9af | 2016-05-18 16:25:35 +0100 | [diff] [blame] | 84 | DWRITE_FONT_SIMULATIONS = EnumFlags("DWRITE_FONT_SIMULATIONS", [ |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 85 | "DWRITE_FONT_SIMULATIONS_NONE", |
| 86 | "DWRITE_FONT_SIMULATIONS_BOLD", |
| 87 | "DWRITE_FONT_SIMULATIONS_OBLIQUE", |
| 88 | ]) |
| 89 | |
| 90 | DWRITE_FONT_WEIGHT = Enum("DWRITE_FONT_WEIGHT", [ |
| 91 | "DWRITE_FONT_WEIGHT_THIN", |
| 92 | "DWRITE_FONT_WEIGHT_EXTRA_LIGHT", |
| 93 | #"DWRITE_FONT_WEIGHT_ULTRA_LIGHT", |
| 94 | "DWRITE_FONT_WEIGHT_LIGHT", |
| 95 | "DWRITE_FONT_WEIGHT_NORMAL", |
| 96 | #"DWRITE_FONT_WEIGHT_REGULAR", |
| 97 | "DWRITE_FONT_WEIGHT_MEDIUM", |
| 98 | "DWRITE_FONT_WEIGHT_DEMI_BOLD", |
| 99 | #"DWRITE_FONT_WEIGHT_SEMI_BOLD", |
| 100 | "DWRITE_FONT_WEIGHT_BOLD", |
| 101 | "DWRITE_FONT_WEIGHT_EXTRA_BOLD", |
| 102 | #"DWRITE_FONT_WEIGHT_ULTRA_BOLD", |
| 103 | "DWRITE_FONT_WEIGHT_BLACK", |
| 104 | #"DWRITE_FONT_WEIGHT_HEAVY", |
| 105 | "DWRITE_FONT_WEIGHT_EXTRA_BLACK", |
| 106 | #"DWRITE_FONT_WEIGHT_ULTRA_BLACK", |
| 107 | ]) |
| 108 | |
| 109 | DWRITE_FONT_STRETCH = Enum("DWRITE_FONT_STRETCH", [ |
| 110 | "DWRITE_FONT_STRETCH_UNDEFINED", |
| 111 | "DWRITE_FONT_STRETCH_ULTRA_CONDENSED", |
| 112 | "DWRITE_FONT_STRETCH_EXTRA_CONDENSED", |
| 113 | "DWRITE_FONT_STRETCH_CONDENSED", |
| 114 | "DWRITE_FONT_STRETCH_SEMI_CONDENSED", |
| 115 | "DWRITE_FONT_STRETCH_NORMAL", |
| 116 | #"DWRITE_FONT_STRETCH_MEDIUM", |
| 117 | "DWRITE_FONT_STRETCH_SEMI_EXPANDED", |
| 118 | "DWRITE_FONT_STRETCH_EXPANDED", |
| 119 | "DWRITE_FONT_STRETCH_EXTRA_EXPANDED", |
| 120 | "DWRITE_FONT_STRETCH_ULTRA_EXPANDED", |
| 121 | ]) |
| 122 | |
| 123 | DWRITE_FONT_STYLE = Enum("DWRITE_FONT_STYLE", [ |
| 124 | "DWRITE_FONT_STYLE_NORMAL", |
| 125 | "DWRITE_FONT_STYLE_OBLIQUE", |
| 126 | "DWRITE_FONT_STYLE_ITALIC", |
| 127 | ]) |
| 128 | |
| 129 | DWRITE_INFORMATIONAL_STRING_ID = Enum("DWRITE_INFORMATIONAL_STRING_ID", [ |
| 130 | "DWRITE_INFORMATIONAL_STRING_NONE", |
| 131 | "DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE", |
| 132 | "DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS", |
| 133 | "DWRITE_INFORMATIONAL_STRING_TRADEMARK", |
| 134 | "DWRITE_INFORMATIONAL_STRING_MANUFACTURER", |
| 135 | "DWRITE_INFORMATIONAL_STRING_DESIGNER", |
| 136 | "DWRITE_INFORMATIONAL_STRING_DESIGNER_URL", |
| 137 | "DWRITE_INFORMATIONAL_STRING_DESCRIPTION", |
| 138 | "DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL", |
| 139 | "DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION", |
| 140 | "DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL", |
| 141 | "DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES", |
| 142 | "DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES", |
| 143 | "DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES", |
| 144 | "DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES", |
| 145 | "DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT", |
| 146 | ]) |
| 147 | |
| 148 | DWRITE_FONT_METRICS = Struct("DWRITE_FONT_METRICS", [ |
| 149 | (UINT16, "designUnitsPerEm"), |
| 150 | (UINT16, "ascent"), |
| 151 | (UINT16, "descent"), |
| 152 | (INT16, "lineGap"), |
| 153 | (UINT16, "capHeight"), |
| 154 | (UINT16, "xHeight"), |
| 155 | (INT16, "underlinePosition"), |
| 156 | (UINT16, "underlineThickness"), |
| 157 | (INT16, "strikethroughPosition"), |
| 158 | (UINT16, "strikethroughThickness"), |
| 159 | ]) |
| 160 | |
| 161 | DWRITE_GLYPH_METRICS = Struct("DWRITE_GLYPH_METRICS", [ |
| 162 | (INT32, "leftSideBearing"), |
| 163 | (UINT32, "advanceWidth"), |
| 164 | (INT32, "rightSideBearing"), |
| 165 | (INT32, "topSideBearing"), |
| 166 | (UINT32, "advanceHeight"), |
| 167 | (INT32, "bottomSideBearing"), |
| 168 | (INT32, "verticalOriginY"), |
| 169 | ]) |
| 170 | |
| 171 | DWRITE_GLYPH_OFFSET = Struct("DWRITE_GLYPH_OFFSET", [ |
| 172 | (FLOAT, "advanceOffset"), |
| 173 | (FLOAT, "ascenderOffset"), |
| 174 | ]) |
| 175 | |
| 176 | DWRITE_FACTORY_TYPE = Enum("DWRITE_FACTORY_TYPE", [ |
| 177 | "DWRITE_FACTORY_TYPE_SHARED", |
| 178 | "DWRITE_FACTORY_TYPE_ISOLATED", |
| 179 | ]) |
| 180 | |
| 181 | IDWriteFontFileLoader.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 182 | StdMethod(HRESULT, "CreateStreamFromKey", [(OpaquePointer(Const(Void)), "fontFileReferenceKey"), (UINT32, "fontFileReferenceKeySize"), Out(Pointer(ObjPointer(IDWriteFontFileStream)), "fontFileStream")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 183 | ] |
| 184 | |
| 185 | IDWriteLocalFontFileLoader.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 186 | StdMethod(HRESULT, "GetFilePathLengthFromKey", [(OpaquePointer(Const(Void)), "fontFileReferenceKey"), (UINT32, "fontFileReferenceKeySize"), Out(Pointer(UINT32), "filePathLength")]), |
| 187 | StdMethod(HRESULT, "GetFilePathFromKey", [(OpaquePointer(Const(Void)), "fontFileReferenceKey"), (UINT32, "fontFileReferenceKeySize"), Out(Pointer(WCHAR), "filePath"), (UINT32, "filePathSize")]), |
| 188 | StdMethod(HRESULT, "GetLastWriteTimeFromKey", [(OpaquePointer(Const(Void)), "fontFileReferenceKey"), (UINT32, "fontFileReferenceKeySize"), Out(Pointer(FILETIME), "lastWriteTime")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 189 | ] |
| 190 | |
| 191 | IDWriteFontFileStream.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 192 | StdMethod(HRESULT, "ReadFileFragment", [Out(Pointer(OpaquePointer(Const(Void))), "fragmentStart"), (UINT64, "fileOffset"), (UINT64, "fragmentSize"), Out(Pointer(OpaquePointer(Void)), "fragmentContext")]), |
| 193 | StdMethod(Void, "ReleaseFileFragment", [(OpaquePointer(Void), "fragmentContext")]), |
| 194 | StdMethod(HRESULT, "GetFileSize", [Out(Pointer(UINT64), "fileSize")]), |
| 195 | StdMethod(HRESULT, "GetLastWriteTime", [Out(Pointer(UINT64), "lastWriteTime")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 196 | ] |
| 197 | |
| 198 | IDWriteFontFile.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 199 | StdMethod(HRESULT, "GetReferenceKey", [Out(Pointer(OpaquePointer(Const(Void))), "fontFileReferenceKey"), Out(Pointer(UINT32), "fontFileReferenceKeySize")]), |
| 200 | StdMethod(HRESULT, "GetLoader", [Out(Pointer(ObjPointer(IDWriteFontFileLoader)), "fontFileLoader")]), |
| 201 | StdMethod(HRESULT, "Analyze", [Out(Pointer(BOOL), "isSupportedFontType"), Out(Pointer(DWRITE_FONT_FILE_TYPE), "fontFileType"), Out(Pointer(DWRITE_FONT_FACE_TYPE), "fontFaceType"), Out(Pointer(UINT32), "numberOfFaces")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 202 | ] |
| 203 | |
| 204 | DWRITE_PIXEL_GEOMETRY = Enum("DWRITE_PIXEL_GEOMETRY", [ |
| 205 | "DWRITE_PIXEL_GEOMETRY_FLAT", |
| 206 | "DWRITE_PIXEL_GEOMETRY_RGB", |
| 207 | "DWRITE_PIXEL_GEOMETRY_BGR", |
| 208 | ]) |
| 209 | |
| 210 | DWRITE_RENDERING_MODE = Enum("DWRITE_RENDERING_MODE", [ |
| 211 | "DWRITE_RENDERING_MODE_DEFAULT", |
| 212 | "DWRITE_RENDERING_MODE_ALIASED", |
| 213 | "DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC", |
| 214 | "DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL", |
| 215 | "DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL", |
| 216 | "DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC", |
| 217 | "DWRITE_RENDERING_MODE_OUTLINE", |
| 218 | ]) |
| 219 | |
| 220 | DWRITE_MATRIX = Struct("DWRITE_MATRIX", [ |
| 221 | (FLOAT, "m11"), |
| 222 | (FLOAT, "m12"), |
| 223 | (FLOAT, "m21"), |
| 224 | (FLOAT, "m22"), |
| 225 | (FLOAT, "dx"), |
| 226 | (FLOAT, "dy"), |
| 227 | ]) |
| 228 | |
| 229 | IDWriteRenderingParams.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 230 | StdMethod(FLOAT, "GetGamma", []), |
| 231 | StdMethod(FLOAT, "GetEnhancedContrast", []), |
| 232 | StdMethod(FLOAT, "GetClearTypeLevel", []), |
| 233 | StdMethod(DWRITE_PIXEL_GEOMETRY, "GetPixelGeometry", []), |
| 234 | StdMethod(DWRITE_RENDERING_MODE, "GetRenderingMode", []), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 235 | ] |
| 236 | |
| 237 | IDWriteFontFace.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 238 | StdMethod(DWRITE_FONT_FACE_TYPE, "GetType", []), |
| 239 | StdMethod(HRESULT, "GetFiles", [(OpaquePointer(UINT32), "numberOfFiles"), Out(Pointer(ObjPointer(IDWriteFontFile)), "fontFiles")]), |
| 240 | StdMethod(UINT32, "GetIndex", []), |
| 241 | StdMethod(DWRITE_FONT_SIMULATIONS, "GetSimulations", []), |
| 242 | StdMethod(BOOL, "IsSymbolFont", []), |
| 243 | StdMethod(Void, "GetMetrics", [Out(Pointer(DWRITE_FONT_METRICS), "fontFaceMetrics")]), |
| 244 | StdMethod(UINT16, "GetGlyphCount", []), |
| 245 | StdMethod(HRESULT, "GetDesignGlyphMetrics", [(Pointer(Const(UINT16)), "glyphIndices"), (UINT32, "glyphCount"), Out(Pointer(DWRITE_GLYPH_METRICS), "glyphMetrics"), (BOOL, "isSideways")]), |
| 246 | StdMethod(HRESULT, "GetGlyphIndices", [(Pointer(Const(UINT32)), "codePoints"), (UINT32, "codePointCount"), Out(Pointer(UINT16), "glyphIndices")]), |
| 247 | StdMethod(HRESULT, "TryGetFontTable", [(UINT32, "openTypeTableTag"), Out(Pointer(OpaquePointer(Const(Void))), "tableData"), Out(Pointer(UINT32), "tableSize"), Out(Pointer(OpaquePointer(Void)), "tableContext"), Out(Pointer(BOOL), "exists")]), |
| 248 | StdMethod(Void, "ReleaseFontTable", [(OpaquePointer(Void), "tableContext")]), |
| 249 | StdMethod(HRESULT, "GetGlyphRunOutline", [(FLOAT, "emSize"), (Pointer(Const(UINT16)), "glyphIndices"), (Pointer(Const(FLOAT)), "glyphAdvances"), (Pointer(Const(DWRITE_GLYPH_OFFSET)), "glyphOffsets"), (UINT32, "glyphCount"), (BOOL, "isSideways"), (BOOL, "isRightToLeft"), (ObjPointer(IDWriteGeometrySink), "geometrySink")]), |
| 250 | StdMethod(HRESULT, "GetRecommendedRenderingMode", [(FLOAT, "emSize"), (FLOAT, "pixelsPerDip"), (DWRITE_MEASURING_MODE, "measuringMode"), (ObjPointer(IDWriteRenderingParams), "renderingParams"), Out(Pointer(DWRITE_RENDERING_MODE), "renderingMode")]), |
| 251 | StdMethod(HRESULT, "GetGdiCompatibleMetrics", [(FLOAT, "emSize"), (FLOAT, "pixelsPerDip"), (Pointer(Const(DWRITE_MATRIX)), "transform"), Out(Pointer(DWRITE_FONT_METRICS), "fontFaceMetrics")]), |
| 252 | StdMethod(HRESULT, "GetGdiCompatibleGlyphMetrics", [(FLOAT, "emSize"), (FLOAT, "pixelsPerDip"), (Pointer(Const(DWRITE_MATRIX)), "transform"), (BOOL, "useGdiNatural"), (Array(Const(UINT16), "glyphCount"), "glyphIndices"), (UINT32, "glyphCount"), Out(Array(DWRITE_GLYPH_METRICS, "glyphCount"), "glyphMetrics"), (BOOL, "isSideways")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 253 | ] |
| 254 | |
| 255 | IDWriteFontCollectionLoader.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 256 | StdMethod(HRESULT, "CreateEnumeratorFromKey", [(ObjPointer(IDWriteFactory), "factory"), (OpaquePointer(Const(Void)), "collectionKey"), (UINT32, "collectionKeySize"), Out(Pointer(ObjPointer(IDWriteFontFileEnumerator)), "fontFileEnumerator")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 257 | ] |
| 258 | |
| 259 | IDWriteFontFileEnumerator.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 260 | StdMethod(HRESULT, "MoveNext", [Out(Pointer(BOOL), "hasCurrentFile")]), |
| 261 | StdMethod(HRESULT, "GetCurrentFontFile", [Out(Pointer(ObjPointer(IDWriteFontFile)), "fontFile")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 262 | ] |
| 263 | |
| 264 | IDWriteLocalizedStrings.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 265 | StdMethod(UINT32, "GetCount", []), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 266 | StdMethod(HRESULT, "FindLocaleName", [(PCWSTR, "localeName"), Out(Pointer(UINT32), "index"), Out(Pointer(BOOL), "exists")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 267 | StdMethod(HRESULT, "GetLocaleNameLength", [(UINT32, "index"), Out(Pointer(UINT32), "length")]), |
| 268 | StdMethod(HRESULT, "GetLocaleName", [(UINT32, "index"), Out(Pointer(WCHAR), "localeName"), (UINT32, "size")]), |
| 269 | StdMethod(HRESULT, "GetStringLength", [(UINT32, "index"), Out(Pointer(UINT32), "length")]), |
| 270 | StdMethod(HRESULT, "GetString", [(UINT32, "index"), Out(Pointer(WCHAR), "stringBuffer"), (UINT32, "size")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 271 | ] |
| 272 | |
| 273 | IDWriteFontCollection.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 274 | StdMethod(UINT32, "GetFontFamilyCount", []), |
| 275 | StdMethod(HRESULT, "GetFontFamily", [(UINT32, "index"), Out(Pointer(ObjPointer(IDWriteFontFamily)), "fontFamily")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 276 | StdMethod(HRESULT, "FindFamilyName", [(PCWSTR, "familyName"), Out(Pointer(UINT32), "index"), Out(Pointer(BOOL), "exists")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 277 | StdMethod(HRESULT, "GetFontFromFontFace", [(ObjPointer(IDWriteFontFace), "fontFace"), Out(Pointer(ObjPointer(IDWriteFont)), "font")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 278 | ] |
| 279 | |
| 280 | IDWriteFontList.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 281 | StdMethod(HRESULT, "GetFontCollection", [Out(Pointer(ObjPointer(IDWriteFontCollection)), "fontCollection")]), |
| 282 | StdMethod(UINT32, "GetFontCount", []), |
| 283 | StdMethod(HRESULT, "GetFont", [(UINT32, "index"), Out(Pointer(ObjPointer(IDWriteFont)), "font")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 284 | ] |
| 285 | |
| 286 | IDWriteFontFamily.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 287 | StdMethod(HRESULT, "GetFamilyNames", [Out(Pointer(ObjPointer(IDWriteLocalizedStrings)), "names")]), |
| 288 | StdMethod(HRESULT, "GetFirstMatchingFont", [(DWRITE_FONT_WEIGHT, "weight"), (DWRITE_FONT_STRETCH, "stretch"), (DWRITE_FONT_STYLE, "style"), Out(Pointer(ObjPointer(IDWriteFont)), "matchingFont")]), |
| 289 | StdMethod(HRESULT, "GetMatchingFonts", [(DWRITE_FONT_WEIGHT, "weight"), (DWRITE_FONT_STRETCH, "stretch"), (DWRITE_FONT_STYLE, "style"), Out(Pointer(ObjPointer(IDWriteFontList)), "matchingFonts")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 290 | ] |
| 291 | |
| 292 | IDWriteFont.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 293 | StdMethod(HRESULT, "GetFontFamily", [Out(Pointer(ObjPointer(IDWriteFontFamily)), "fontFamily")]), |
| 294 | StdMethod(DWRITE_FONT_WEIGHT, "GetWeight", []), |
| 295 | StdMethod(DWRITE_FONT_STRETCH, "GetStretch", []), |
| 296 | StdMethod(DWRITE_FONT_STYLE, "GetStyle", []), |
| 297 | StdMethod(BOOL, "IsSymbolFont", []), |
| 298 | StdMethod(HRESULT, "GetFaceNames", [Out(Pointer(ObjPointer(IDWriteLocalizedStrings)), "names")]), |
| 299 | StdMethod(HRESULT, "GetInformationalStrings", [(DWRITE_INFORMATIONAL_STRING_ID, "informationalStringID"), Out(Pointer(ObjPointer(IDWriteLocalizedStrings)), "informationalStrings"), Out(Pointer(BOOL), "exists")]), |
| 300 | StdMethod(DWRITE_FONT_SIMULATIONS, "GetSimulations", []), |
| 301 | StdMethod(Void, "GetMetrics", [Out(Pointer(DWRITE_FONT_METRICS), "fontMetrics")]), |
| 302 | StdMethod(HRESULT, "HasCharacter", [(UINT32, "unicodeValue"), Out(Pointer(BOOL), "exists")]), |
| 303 | StdMethod(HRESULT, "CreateFontFace", [Out(Pointer(ObjPointer(IDWriteFontFace)), "fontFace")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 304 | ] |
| 305 | |
| 306 | DWRITE_READING_DIRECTION = Enum("DWRITE_READING_DIRECTION", [ |
| 307 | "DWRITE_READING_DIRECTION_LEFT_TO_RIGHT", |
| 308 | "DWRITE_READING_DIRECTION_RIGHT_TO_LEFT", |
| 309 | ]) |
| 310 | |
| 311 | DWRITE_FLOW_DIRECTION = Enum("DWRITE_FLOW_DIRECTION", [ |
| 312 | "DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM", |
| 313 | ]) |
| 314 | |
| 315 | DWRITE_TEXT_ALIGNMENT = Enum("DWRITE_TEXT_ALIGNMENT", [ |
| 316 | "DWRITE_TEXT_ALIGNMENT_LEADING", |
| 317 | "DWRITE_TEXT_ALIGNMENT_TRAILING", |
| 318 | "DWRITE_TEXT_ALIGNMENT_CENTER", |
| 319 | ]) |
| 320 | |
| 321 | DWRITE_PARAGRAPH_ALIGNMENT = Enum("DWRITE_PARAGRAPH_ALIGNMENT", [ |
| 322 | "DWRITE_PARAGRAPH_ALIGNMENT_NEAR", |
| 323 | "DWRITE_PARAGRAPH_ALIGNMENT_FAR", |
| 324 | "DWRITE_PARAGRAPH_ALIGNMENT_CENTER", |
| 325 | ]) |
| 326 | |
| 327 | DWRITE_WORD_WRAPPING = Enum("DWRITE_WORD_WRAPPING", [ |
| 328 | "DWRITE_WORD_WRAPPING_WRAP", |
| 329 | "DWRITE_WORD_WRAPPING_NO_WRAP", |
| 330 | ]) |
| 331 | |
| 332 | DWRITE_LINE_SPACING_METHOD = Enum("DWRITE_LINE_SPACING_METHOD", [ |
| 333 | "DWRITE_LINE_SPACING_METHOD_DEFAULT", |
| 334 | "DWRITE_LINE_SPACING_METHOD_UNIFORM", |
| 335 | ]) |
| 336 | |
| 337 | DWRITE_TRIMMING_GRANULARITY = Enum("DWRITE_TRIMMING_GRANULARITY", [ |
| 338 | "DWRITE_TRIMMING_GRANULARITY_NONE", |
| 339 | "DWRITE_TRIMMING_GRANULARITY_CHARACTER", |
| 340 | "DWRITE_TRIMMING_GRANULARITY_WORD", |
| 341 | ]) |
| 342 | |
| 343 | DWRITE_FONT_FEATURE_TAG = Enum("DWRITE_FONT_FEATURE_TAG", [ |
| 344 | "DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS", |
| 345 | "DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS", |
| 346 | "DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS", |
| 347 | "DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES", |
| 348 | "DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS", |
| 349 | "DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION", |
| 350 | "DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES", |
| 351 | "DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING", |
| 352 | "DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH", |
| 353 | "DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING", |
| 354 | "DWRITE_FONT_FEATURE_TAG_DEFAULT", |
| 355 | "DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES", |
| 356 | "DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS", |
| 357 | "DWRITE_FONT_FEATURE_TAG_FRACTIONS", |
| 358 | "DWRITE_FONT_FEATURE_TAG_FULL_WIDTH", |
| 359 | "DWRITE_FONT_FEATURE_TAG_HALF_FORMS", |
| 360 | "DWRITE_FONT_FEATURE_TAG_HALANT_FORMS", |
| 361 | "DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH", |
| 362 | "DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS", |
| 363 | "DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES", |
| 364 | "DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES", |
| 365 | "DWRITE_FONT_FEATURE_TAG_HALF_WIDTH", |
| 366 | "DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS", |
| 367 | "DWRITE_FONT_FEATURE_TAG_JIS04_FORMS", |
| 368 | "DWRITE_FONT_FEATURE_TAG_JIS78_FORMS", |
| 369 | "DWRITE_FONT_FEATURE_TAG_JIS83_FORMS", |
| 370 | "DWRITE_FONT_FEATURE_TAG_JIS90_FORMS", |
| 371 | "DWRITE_FONT_FEATURE_TAG_KERNING", |
| 372 | "DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES", |
| 373 | "DWRITE_FONT_FEATURE_TAG_LINING_FIGURES", |
| 374 | "DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS", |
| 375 | "DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING", |
| 376 | "DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK", |
| 377 | "DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING", |
| 378 | "DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS", |
| 379 | "DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS", |
| 380 | "DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES", |
| 381 | "DWRITE_FONT_FEATURE_TAG_ORDINALS", |
| 382 | "DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH", |
| 383 | "DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS", |
| 384 | "DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES", |
| 385 | "DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS", |
| 386 | "DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS", |
| 387 | "DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES", |
| 388 | "DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS", |
| 389 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES", |
| 390 | "DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS", |
| 391 | "DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS", |
| 392 | "DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS", |
| 393 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1", |
| 394 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2", |
| 395 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3", |
| 396 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4", |
| 397 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5", |
| 398 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6", |
| 399 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7", |
| 400 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8", |
| 401 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9", |
| 402 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10", |
| 403 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11", |
| 404 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12", |
| 405 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13", |
| 406 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14", |
| 407 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15", |
| 408 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16", |
| 409 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17", |
| 410 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18", |
| 411 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19", |
| 412 | "DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20", |
| 413 | "DWRITE_FONT_FEATURE_TAG_SUBSCRIPT", |
| 414 | "DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT", |
| 415 | "DWRITE_FONT_FEATURE_TAG_SWASH", |
| 416 | "DWRITE_FONT_FEATURE_TAG_TITLING", |
| 417 | "DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS", |
| 418 | "DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES", |
| 419 | "DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS", |
| 420 | "DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS", |
| 421 | "DWRITE_FONT_FEATURE_TAG_UNICASE", |
| 422 | "DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO", |
| 423 | ]) |
| 424 | |
| 425 | DWRITE_TEXT_RANGE = Struct("DWRITE_TEXT_RANGE", [ |
| 426 | (UINT32, "startPosition"), |
| 427 | (UINT32, "length"), |
| 428 | ]) |
| 429 | |
| 430 | DWRITE_FONT_FEATURE = Struct("DWRITE_FONT_FEATURE", [ |
| 431 | (DWRITE_FONT_FEATURE_TAG, "nameTag"), |
| 432 | (UINT32, "parameter"), |
| 433 | ]) |
| 434 | |
| 435 | DWRITE_TYPOGRAPHIC_FEATURES = Struct("DWRITE_TYPOGRAPHIC_FEATURES", [ |
| 436 | (OpaquePointer(DWRITE_FONT_FEATURE), "features"), |
| 437 | (UINT32, "featureCount"), |
| 438 | ]) |
| 439 | |
| 440 | DWRITE_TRIMMING = Struct("DWRITE_TRIMMING", [ |
| 441 | (DWRITE_TRIMMING_GRANULARITY, "granularity"), |
| 442 | (UINT32, "delimiter"), |
| 443 | (UINT32, "delimiterCount"), |
| 444 | ]) |
| 445 | |
| 446 | IDWriteTextFormat.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 447 | StdMethod(HRESULT, "SetTextAlignment", [(DWRITE_TEXT_ALIGNMENT, "textAlignment")]), |
| 448 | StdMethod(HRESULT, "SetParagraphAlignment", [(DWRITE_PARAGRAPH_ALIGNMENT, "paragraphAlignment")]), |
| 449 | StdMethod(HRESULT, "SetWordWrapping", [(DWRITE_WORD_WRAPPING, "wordWrapping")]), |
| 450 | StdMethod(HRESULT, "SetReadingDirection", [(DWRITE_READING_DIRECTION, "readingDirection")]), |
| 451 | StdMethod(HRESULT, "SetFlowDirection", [(DWRITE_FLOW_DIRECTION, "flowDirection")]), |
| 452 | StdMethod(HRESULT, "SetIncrementalTabStop", [(FLOAT, "incrementalTabStop")]), |
José Fonseca | 5d7fc05 | 2012-11-13 19:53:47 +0000 | [diff] [blame] | 453 | StdMethod(HRESULT, "SetTrimming", [(Pointer(Const(DWRITE_TRIMMING)), "trimmingOptions"), (OpaquePointer(IDWriteInlineObject), "trimmingSign")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 454 | StdMethod(HRESULT, "SetLineSpacing", [(DWRITE_LINE_SPACING_METHOD, "lineSpacingMethod"), (FLOAT, "lineSpacing"), (FLOAT, "baseline")]), |
| 455 | StdMethod(DWRITE_TEXT_ALIGNMENT, "GetTextAlignment", []), |
| 456 | StdMethod(DWRITE_PARAGRAPH_ALIGNMENT, "GetParagraphAlignment", []), |
| 457 | StdMethod(DWRITE_WORD_WRAPPING, "GetWordWrapping", []), |
| 458 | StdMethod(DWRITE_READING_DIRECTION, "GetReadingDirection", []), |
| 459 | StdMethod(DWRITE_FLOW_DIRECTION, "GetFlowDirection", []), |
| 460 | StdMethod(FLOAT, "GetIncrementalTabStop", []), |
José Fonseca | 5d7fc05 | 2012-11-13 19:53:47 +0000 | [diff] [blame] | 461 | StdMethod(HRESULT, "GetTrimming", [Out(Pointer(DWRITE_TRIMMING), "trimmingOptions"), Out(Pointer(OpaquePointer(IDWriteInlineObject)), "trimmingSign")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 462 | StdMethod(HRESULT, "GetLineSpacing", [Out(Pointer(DWRITE_LINE_SPACING_METHOD), "lineSpacingMethod"), Out(Pointer(FLOAT), "lineSpacing"), Out(Pointer(FLOAT), "baseline")]), |
| 463 | StdMethod(HRESULT, "GetFontCollection", [Out(Pointer(ObjPointer(IDWriteFontCollection)), "fontCollection")]), |
| 464 | StdMethod(UINT32, "GetFontFamilyNameLength", []), |
| 465 | StdMethod(HRESULT, "GetFontFamilyName", [Out(Pointer(WCHAR), "fontFamilyName"), (UINT32, "nameSize")]), |
| 466 | StdMethod(DWRITE_FONT_WEIGHT, "GetFontWeight", []), |
| 467 | StdMethod(DWRITE_FONT_STYLE, "GetFontStyle", []), |
| 468 | StdMethod(DWRITE_FONT_STRETCH, "GetFontStretch", []), |
| 469 | StdMethod(FLOAT, "GetFontSize", []), |
| 470 | StdMethod(UINT32, "GetLocaleNameLength", []), |
| 471 | StdMethod(HRESULT, "GetLocaleName", [Out(Pointer(WCHAR), "localeName"), (UINT32, "nameSize")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 472 | ] |
| 473 | |
| 474 | IDWriteTypography.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 475 | StdMethod(HRESULT, "AddFontFeature", [(DWRITE_FONT_FEATURE, "fontFeature")]), |
| 476 | StdMethod(UINT32, "GetFontFeatureCount", []), |
| 477 | StdMethod(HRESULT, "GetFontFeature", [(UINT32, "fontFeatureIndex"), Out(Pointer(DWRITE_FONT_FEATURE), "fontFeature")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 478 | ] |
| 479 | |
Jose Fonseca | 8a4c9af | 2016-05-18 16:25:35 +0100 | [diff] [blame] | 480 | DWRITE_SCRIPT_SHAPES = EnumFlags("DWRITE_SCRIPT_SHAPES", [ |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 481 | "DWRITE_SCRIPT_SHAPES_DEFAULT", |
| 482 | "DWRITE_SCRIPT_SHAPES_NO_VISUAL", |
| 483 | ]) |
| 484 | |
| 485 | DWRITE_SCRIPT_ANALYSIS = Struct("DWRITE_SCRIPT_ANALYSIS", [ |
| 486 | (UINT16, "script"), |
| 487 | (DWRITE_SCRIPT_SHAPES, "shapes"), |
| 488 | ]) |
| 489 | |
| 490 | DWRITE_BREAK_CONDITION = Enum("DWRITE_BREAK_CONDITION", [ |
| 491 | "DWRITE_BREAK_CONDITION_NEUTRAL", |
| 492 | "DWRITE_BREAK_CONDITION_CAN_BREAK", |
| 493 | "DWRITE_BREAK_CONDITION_MAY_NOT_BREAK", |
| 494 | "DWRITE_BREAK_CONDITION_MUST_BREAK", |
| 495 | ]) |
| 496 | |
| 497 | DWRITE_LINE_BREAKPOINT = Struct("DWRITE_LINE_BREAKPOINT", [ |
| 498 | (UINT8, "breakConditionBefore"), |
| 499 | (UINT8, "breakConditionAfter"), |
| 500 | (UINT8, "isWhitespace"), |
| 501 | (UINT8, "isSoftHyphen"), |
| 502 | (UINT8, "padding"), |
| 503 | ]) |
| 504 | |
| 505 | DWRITE_NUMBER_SUBSTITUTION_METHOD = Enum("DWRITE_NUMBER_SUBSTITUTION_METHOD", [ |
| 506 | "DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE", |
| 507 | "DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL", |
| 508 | "DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE", |
| 509 | "DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL", |
| 510 | "DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL", |
| 511 | ]) |
| 512 | |
| 513 | IDWriteNumberSubstitution.methods += [ |
| 514 | ] |
| 515 | |
| 516 | DWRITE_SHAPING_TEXT_PROPERTIES = Struct("DWRITE_SHAPING_TEXT_PROPERTIES", [ |
| 517 | (UINT16, "isShapedAlone"), |
| 518 | (UINT16, "reserved"), |
| 519 | ]) |
| 520 | |
| 521 | DWRITE_SHAPING_GLYPH_PROPERTIES = Struct("DWRITE_SHAPING_GLYPH_PROPERTIES", [ |
| 522 | (UINT16, "justification"), |
| 523 | (UINT16, "isClusterStart"), |
| 524 | (UINT16, "isDiacritic"), |
| 525 | (UINT16, "isZeroWidthSpace"), |
| 526 | (UINT16, "reserved"), |
| 527 | ]) |
| 528 | |
| 529 | IDWriteTextAnalysisSource.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 530 | StdMethod(HRESULT, "GetTextAtPosition", [(UINT32, "textPosition"), Out(Pointer(Pointer(Const(WCHAR))), "textString"), Out(Pointer(UINT32), "textLength")]), |
| 531 | StdMethod(HRESULT, "GetTextBeforePosition", [(UINT32, "textPosition"), Out(Pointer(Pointer(Const(WCHAR))), "textString"), Out(Pointer(UINT32), "textLength")]), |
| 532 | StdMethod(DWRITE_READING_DIRECTION, "GetParagraphReadingDirection", []), |
| 533 | StdMethod(HRESULT, "GetLocaleName", [(UINT32, "textPosition"), Out(Pointer(UINT32), "textLength"), Out(Pointer(Pointer(Const(WCHAR))), "localeName")]), |
| 534 | StdMethod(HRESULT, "GetNumberSubstitution", [(UINT32, "textPosition"), Out(Pointer(UINT32), "textLength"), Out(Pointer(ObjPointer(IDWriteNumberSubstitution)), "numberSubstitution")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 535 | ] |
| 536 | |
| 537 | IDWriteTextAnalysisSink.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 538 | StdMethod(HRESULT, "SetScriptAnalysis", [(UINT32, "textPosition"), (UINT32, "textLength"), (Pointer(Const(DWRITE_SCRIPT_ANALYSIS)), "scriptAnalysis")]), |
| 539 | StdMethod(HRESULT, "SetLineBreakpoints", [(UINT32, "textPosition"), (UINT32, "textLength"), (Pointer(Const(DWRITE_LINE_BREAKPOINT)), "lineBreakpoints")]), |
| 540 | StdMethod(HRESULT, "SetBidiLevel", [(UINT32, "textPosition"), (UINT32, "textLength"), (UINT8, "explicitLevel"), (UINT8, "resolvedLevel")]), |
| 541 | StdMethod(HRESULT, "SetNumberSubstitution", [(UINT32, "textPosition"), (UINT32, "textLength"), (ObjPointer(IDWriteNumberSubstitution), "numberSubstitution")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 542 | ] |
| 543 | |
| 544 | IDWriteTextAnalyzer.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 545 | StdMethod(HRESULT, "AnalyzeScript", [(ObjPointer(IDWriteTextAnalysisSource), "analysisSource"), (UINT32, "textPosition"), (UINT32, "textLength"), (ObjPointer(IDWriteTextAnalysisSink), "analysisSink")]), |
| 546 | StdMethod(HRESULT, "AnalyzeBidi", [(ObjPointer(IDWriteTextAnalysisSource), "analysisSource"), (UINT32, "textPosition"), (UINT32, "textLength"), (ObjPointer(IDWriteTextAnalysisSink), "analysisSink")]), |
| 547 | StdMethod(HRESULT, "AnalyzeNumberSubstitution", [(ObjPointer(IDWriteTextAnalysisSource), "analysisSource"), (UINT32, "textPosition"), (UINT32, "textLength"), (ObjPointer(IDWriteTextAnalysisSink), "analysisSink")]), |
| 548 | StdMethod(HRESULT, "AnalyzeLineBreakpoints", [(ObjPointer(IDWriteTextAnalysisSource), "analysisSource"), (UINT32, "textPosition"), (UINT32, "textLength"), (ObjPointer(IDWriteTextAnalysisSink), "analysisSink")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 549 | StdMethod(HRESULT, "GetGlyphs", [(String(Const(WCHAR), "textLength", wide=True), "textString"), (UINT32, "textLength"), (ObjPointer(IDWriteFontFace), "fontFace"), (BOOL, "isSideways"), (BOOL, "isRightToLeft"), (Pointer(Const(DWRITE_SCRIPT_ANALYSIS)), "scriptAnalysis"), (PCWSTR, "localeName"), (ObjPointer(IDWriteNumberSubstitution), "numberSubstitution"), (OpaquePointer(Pointer(Const(DWRITE_TYPOGRAPHIC_FEATURES))), "features"), (Pointer(Const(UINT32)), "featureRangeLengths"), (UINT32, "featureRanges"), (UINT32, "maxGlyphCount"), Out(Pointer(UINT16), "clusterMap"), Out(Pointer(DWRITE_SHAPING_TEXT_PROPERTIES), "textProps"), Out(Pointer(UINT16), "glyphIndices"), Out(Pointer(DWRITE_SHAPING_GLYPH_PROPERTIES), "glyphProps"), Out(Pointer(UINT32), "actualGlyphCount")]), |
| 550 | StdMethod(HRESULT, "GetGlyphPlacements", [(String(Const(WCHAR), "textLength", wide=True), "textString"), (Array(Const(UINT16), "textLength"), "clusterMap"), (Array(DWRITE_SHAPING_TEXT_PROPERTIES, "textLength"), "textProps"), (UINT32, "textLength"), (Array(Const(UINT16), "glyphCount"), "glyphIndices"), (Array(Const(DWRITE_SHAPING_GLYPH_PROPERTIES), "glyphCount"), "glyphProps"), (UINT32, "glyphCount"), (ObjPointer(IDWriteFontFace), "fontFace"), (FLOAT, "fontEmSize"), (BOOL, "isSideways"), (BOOL, "isRightToLeft"), (Pointer(Const(DWRITE_SCRIPT_ANALYSIS)), "scriptAnalysis"), (LPCWSTR, "localeName"), (Array(Pointer(Const(DWRITE_TYPOGRAPHIC_FEATURES)), "featureRanges"), "features"), (Array(Const(UINT32), "featureRanges"), "featureRangeLengths"), (UINT32, "featureRanges"), Out(Array(FLOAT, "glyphCount"), "glyphAdvances"), Out(Array(DWRITE_GLYPH_OFFSET, "glyphCount"), "glyphOffsets")]), |
| 551 | StdMethod(HRESULT, "GetGdiCompatibleGlyphPlacements", [(String(Const(WCHAR), "textLength", wide=True), "textString"), (Array(Const(UINT16), "textLength"), "clusterMap"), (Array(DWRITE_SHAPING_TEXT_PROPERTIES, "textLength"), "textProps"), (UINT32, "textLength"), (Array(Const(UINT16), "glyphCount"), "glyphIndices"), (Array(Const(DWRITE_SHAPING_GLYPH_PROPERTIES), "glyphCount"), "glyphProps"), (UINT32, "glyphCount"), (ObjPointer(IDWriteFontFace), "fontFace"), (FLOAT, "fontEmSize"), (FLOAT, "pixelsPerDip"), (Pointer(Const(DWRITE_MATRIX)), "transform"), (BOOL, "useGdiNatural"), (BOOL, "isSideways"), (BOOL, "isRightToLeft"), (Pointer(Const(DWRITE_SCRIPT_ANALYSIS)), "scriptAnalysis"), (LPCWSTR, "localeName"), (Array(Pointer(Const(DWRITE_TYPOGRAPHIC_FEATURES)), "featureRanges"), "features"), (Array(Const(UINT32), "featureRanges"), "featureRangeLengths"), (UINT32, "featureRanges"), Out(Array(FLOAT, "glyphCount"), "glyphAdvances"), Out(Array(DWRITE_GLYPH_OFFSET, "glyphCount"), "glyphOffsets")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 552 | ] |
| 553 | |
| 554 | DWRITE_GLYPH_RUN = Struct("DWRITE_GLYPH_RUN", [ |
José Fonseca | e7cb2b9 | 2012-09-28 08:40:24 +0100 | [diff] [blame] | 555 | (ObjPointer(IDWriteFontFace), "fontFace"), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 556 | (FLOAT, "fontEmSize"), |
| 557 | (UINT32, "glyphCount"), |
| 558 | (Pointer(Const(UINT16)), "glyphIndices"), |
| 559 | (Pointer(Const(FLOAT)), "glyphAdvances"), |
| 560 | (Pointer(Const(DWRITE_GLYPH_OFFSET)), "glyphOffsets"), |
| 561 | (BOOL, "isSideways"), |
| 562 | (UINT32, "bidiLevel"), |
| 563 | ]) |
| 564 | |
| 565 | DWRITE_GLYPH_RUN_DESCRIPTION = Struct("DWRITE_GLYPH_RUN_DESCRIPTION", [ |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 566 | (PCWSTR, "localeName"), |
| 567 | (String(Const(WCHAR), "{self}.stringLength", wide=True), "string"), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 568 | (UINT32, "stringLength"), |
| 569 | (Pointer(Const(UINT16)), "clusterMap"), |
| 570 | (UINT32, "textPosition"), |
| 571 | ]) |
| 572 | |
| 573 | DWRITE_UNDERLINE = Struct("DWRITE_UNDERLINE", [ |
| 574 | (FLOAT, "width"), |
| 575 | (FLOAT, "thickness"), |
| 576 | (FLOAT, "offset"), |
| 577 | (FLOAT, "runHeight"), |
| 578 | (DWRITE_READING_DIRECTION, "readingDirection"), |
| 579 | (DWRITE_FLOW_DIRECTION, "flowDirection"), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 580 | (PCWSTR, "localeName"), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 581 | (DWRITE_MEASURING_MODE, "measuringMode"), |
| 582 | ]) |
| 583 | |
| 584 | DWRITE_STRIKETHROUGH = Struct("DWRITE_STRIKETHROUGH", [ |
| 585 | (FLOAT, "width"), |
| 586 | (FLOAT, "thickness"), |
| 587 | (FLOAT, "offset"), |
| 588 | (DWRITE_READING_DIRECTION, "readingDirection"), |
| 589 | (DWRITE_FLOW_DIRECTION, "flowDirection"), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 590 | (PCWSTR, "localeName"), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 591 | (DWRITE_MEASURING_MODE, "measuringMode"), |
| 592 | ]) |
| 593 | |
| 594 | DWRITE_LINE_METRICS = Struct("DWRITE_LINE_METRICS", [ |
| 595 | (UINT32, "length"), |
| 596 | (UINT32, "trailingWhitespaceLength"), |
| 597 | (UINT32, "newlineLength"), |
| 598 | (FLOAT, "height"), |
| 599 | (FLOAT, "baseline"), |
| 600 | (BOOL, "isTrimmed"), |
| 601 | ]) |
| 602 | |
| 603 | DWRITE_CLUSTER_METRICS = Struct("DWRITE_CLUSTER_METRICS", [ |
| 604 | (FLOAT, "width"), |
| 605 | (UINT16, "length"), |
| 606 | (UINT16, "canWrapLineAfter"), |
| 607 | (UINT16, "isWhitespace"), |
| 608 | (UINT16, "isNewline"), |
| 609 | (UINT16, "isSoftHyphen"), |
| 610 | (UINT16, "isRightToLeft"), |
| 611 | (UINT16, "padding"), |
| 612 | ]) |
| 613 | |
| 614 | DWRITE_TEXT_METRICS = Struct("DWRITE_TEXT_METRICS", [ |
| 615 | (FLOAT, "left"), |
| 616 | (FLOAT, "top"), |
| 617 | (FLOAT, "width"), |
| 618 | (FLOAT, "widthIncludingTrailingWhitespace"), |
| 619 | (FLOAT, "height"), |
| 620 | (FLOAT, "layoutWidth"), |
| 621 | (FLOAT, "layoutHeight"), |
| 622 | (UINT32, "maxBidiReorderingDepth"), |
| 623 | (UINT32, "lineCount"), |
| 624 | ]) |
| 625 | |
| 626 | DWRITE_INLINE_OBJECT_METRICS = Struct("DWRITE_INLINE_OBJECT_METRICS", [ |
| 627 | (FLOAT, "width"), |
| 628 | (FLOAT, "height"), |
| 629 | (FLOAT, "baseline"), |
| 630 | (BOOL, "supportsSideways"), |
| 631 | ]) |
| 632 | |
| 633 | DWRITE_OVERHANG_METRICS = Struct("DWRITE_OVERHANG_METRICS", [ |
| 634 | (FLOAT, "left"), |
| 635 | (FLOAT, "top"), |
| 636 | (FLOAT, "right"), |
| 637 | (FLOAT, "bottom"), |
| 638 | ]) |
| 639 | |
| 640 | DWRITE_HIT_TEST_METRICS = Struct("DWRITE_HIT_TEST_METRICS", [ |
| 641 | (UINT32, "textPosition"), |
| 642 | (UINT32, "length"), |
| 643 | (FLOAT, "left"), |
| 644 | (FLOAT, "top"), |
| 645 | (FLOAT, "width"), |
| 646 | (FLOAT, "height"), |
| 647 | (UINT32, "bidiLevel"), |
| 648 | (BOOL, "isText"), |
| 649 | (BOOL, "isTrimmed"), |
| 650 | ]) |
| 651 | |
| 652 | IDWriteInlineObject.methods += [ |
José Fonseca | 5d7fc05 | 2012-11-13 19:53:47 +0000 | [diff] [blame] | 653 | StdMethod(HRESULT, "Draw", [(OpaquePointer(Void), "clientDrawingContext"), (OpaquePointer(IDWriteTextRenderer), "renderer"), (FLOAT, "originX"), (FLOAT, "originY"), (BOOL, "isSideways"), (BOOL, "isRightToLeft"), (ObjPointer(IUnknown), "clientDrawingEffect")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 654 | StdMethod(HRESULT, "GetMetrics", [Out(Pointer(DWRITE_INLINE_OBJECT_METRICS), "metrics")]), |
| 655 | StdMethod(HRESULT, "GetOverhangMetrics", [Out(Pointer(DWRITE_OVERHANG_METRICS), "overhangs")]), |
| 656 | StdMethod(HRESULT, "GetBreakConditions", [Out(Pointer(DWRITE_BREAK_CONDITION), "breakConditionBefore"), Out(Pointer(DWRITE_BREAK_CONDITION), "breakConditionAfter")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 657 | ] |
| 658 | |
| 659 | IDWritePixelSnapping.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 660 | StdMethod(HRESULT, "IsPixelSnappingDisabled", [(OpaquePointer(Void), "clientDrawingContext"), Out(Pointer(BOOL), "isDisabled")]), |
| 661 | StdMethod(HRESULT, "GetCurrentTransform", [(OpaquePointer(Void), "clientDrawingContext"), Out(Pointer(DWRITE_MATRIX), "transform")]), |
| 662 | StdMethod(HRESULT, "GetPixelsPerDip", [(OpaquePointer(Void), "clientDrawingContext"), Out(Pointer(FLOAT), "pixelsPerDip")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 663 | ] |
| 664 | |
| 665 | IDWriteTextRenderer.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 666 | StdMethod(HRESULT, "DrawGlyphRun", [(OpaquePointer(Void), "clientDrawingContext"), (FLOAT, "baselineOriginX"), (FLOAT, "baselineOriginY"), (DWRITE_MEASURING_MODE, "measuringMode"), (Pointer(Const(DWRITE_GLYPH_RUN)), "glyphRun"), (Pointer(Const(DWRITE_GLYPH_RUN_DESCRIPTION)), "glyphRunDescription"), (ObjPointer(IUnknown), "clientDrawingEffect")]), |
| 667 | StdMethod(HRESULT, "DrawUnderline", [(OpaquePointer(Void), "clientDrawingContext"), (FLOAT, "baselineOriginX"), (FLOAT, "baselineOriginY"), (Pointer(Const(DWRITE_UNDERLINE)), "underline"), (ObjPointer(IUnknown), "clientDrawingEffect")]), |
| 668 | StdMethod(HRESULT, "DrawStrikethrough", [(OpaquePointer(Void), "clientDrawingContext"), (FLOAT, "baselineOriginX"), (FLOAT, "baselineOriginY"), (Pointer(Const(DWRITE_STRIKETHROUGH)), "strikethrough"), (ObjPointer(IUnknown), "clientDrawingEffect")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 669 | StdMethod(HRESULT, "DrawInlineObject", [(OpaquePointer(Void), "clientDrawingContext"), (FLOAT, "originX"), (FLOAT, "originY"), (OpaquePointer(IDWriteInlineObject), "inlineObject"), (BOOL, "isSideways"), (BOOL, "isRightToLeft"), (ObjPointer(IUnknown), "clientDrawingEffect")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 670 | ] |
| 671 | |
| 672 | IDWriteTextLayout.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 673 | StdMethod(HRESULT, "SetMaxWidth", [(FLOAT, "maxWidth")]), |
| 674 | StdMethod(HRESULT, "SetMaxHeight", [(FLOAT, "maxHeight")]), |
| 675 | StdMethod(HRESULT, "SetFontCollection", [(ObjPointer(IDWriteFontCollection), "fontCollection"), (DWRITE_TEXT_RANGE, "textRange")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 676 | StdMethod(HRESULT, "SetFontFamilyName", [(PCWSTR, "fontFamilyName"), (DWRITE_TEXT_RANGE, "textRange")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 677 | StdMethod(HRESULT, "SetFontWeight", [(DWRITE_FONT_WEIGHT, "fontWeight"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 678 | StdMethod(HRESULT, "SetFontStyle", [(DWRITE_FONT_STYLE, "fontStyle"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 679 | StdMethod(HRESULT, "SetFontStretch", [(DWRITE_FONT_STRETCH, "fontStretch"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 680 | StdMethod(HRESULT, "SetFontSize", [(FLOAT, "fontSize"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 681 | StdMethod(HRESULT, "SetUnderline", [(BOOL, "hasUnderline"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 682 | StdMethod(HRESULT, "SetStrikethrough", [(BOOL, "hasStrikethrough"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 683 | StdMethod(HRESULT, "SetDrawingEffect", [(ObjPointer(IUnknown), "drawingEffect"), (DWRITE_TEXT_RANGE, "textRange")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 684 | StdMethod(HRESULT, "SetInlineObject", [(OpaquePointer(IDWriteInlineObject), "inlineObject"), (DWRITE_TEXT_RANGE, "textRange")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 685 | StdMethod(HRESULT, "SetTypography", [(ObjPointer(IDWriteTypography), "typography"), (DWRITE_TEXT_RANGE, "textRange")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 686 | StdMethod(HRESULT, "SetLocaleName", [(PCWSTR, "localeName"), (DWRITE_TEXT_RANGE, "textRange")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 687 | StdMethod(FLOAT, "GetMaxWidth", []), |
| 688 | StdMethod(FLOAT, "GetMaxHeight", []), |
| 689 | StdMethod(HRESULT, "GetFontCollection", [(UINT32, "currentPosition"), Out(Pointer(ObjPointer(IDWriteFontCollection)), "fontCollection"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 690 | StdMethod(HRESULT, "GetFontFamilyNameLength", [(UINT32, "currentPosition"), Out(Pointer(UINT32), "nameLength"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 691 | StdMethod(HRESULT, "GetFontFamilyName", [(UINT32, "currentPosition"), Out(Pointer(WCHAR), "fontFamilyName"), (UINT32, "nameSize"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 692 | StdMethod(HRESULT, "GetFontWeight", [(UINT32, "currentPosition"), Out(Pointer(DWRITE_FONT_WEIGHT), "fontWeight"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 693 | StdMethod(HRESULT, "GetFontStyle", [(UINT32, "currentPosition"), Out(Pointer(DWRITE_FONT_STYLE), "fontStyle"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 694 | StdMethod(HRESULT, "GetFontStretch", [(UINT32, "currentPosition"), Out(Pointer(DWRITE_FONT_STRETCH), "fontStretch"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 695 | StdMethod(HRESULT, "GetFontSize", [(UINT32, "currentPosition"), Out(Pointer(FLOAT), "fontSize"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 696 | StdMethod(HRESULT, "GetUnderline", [(UINT32, "currentPosition"), Out(Pointer(BOOL), "hasUnderline"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 697 | StdMethod(HRESULT, "GetStrikethrough", [(UINT32, "currentPosition"), Out(Pointer(BOOL), "hasStrikethrough"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 698 | StdMethod(HRESULT, "GetDrawingEffect", [(UINT32, "currentPosition"), Out(Pointer(ObjPointer(IUnknown)), "drawingEffect"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 699 | StdMethod(HRESULT, "GetInlineObject", [(UINT32, "currentPosition"), Out(Pointer(OpaquePointer(IDWriteInlineObject)), "inlineObject"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 700 | StdMethod(HRESULT, "GetTypography", [(UINT32, "currentPosition"), Out(Pointer(ObjPointer(IDWriteTypography)), "typography"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 701 | StdMethod(HRESULT, "GetLocaleNameLength", [(UINT32, "currentPosition"), Out(Pointer(UINT32), "nameLength"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 702 | StdMethod(HRESULT, "GetLocaleName", [(UINT32, "currentPosition"), Out(Pointer(WCHAR), "localeName"), (UINT32, "nameSize"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
José Fonseca | 5d7fc05 | 2012-11-13 19:53:47 +0000 | [diff] [blame] | 703 | StdMethod(HRESULT, "Draw", [(OpaquePointer(Void), "clientDrawingContext"), (OpaquePointer(IDWriteTextRenderer), "renderer"), (FLOAT, "originX"), (FLOAT, "originY")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 704 | StdMethod(HRESULT, "GetLineMetrics", [Out(Pointer(DWRITE_LINE_METRICS), "lineMetrics"), (UINT32, "maxLineCount"), Out(Pointer(UINT32), "actualLineCount")]), |
| 705 | StdMethod(HRESULT, "GetMetrics", [Out(Pointer(DWRITE_TEXT_METRICS), "textMetrics")]), |
| 706 | StdMethod(HRESULT, "GetOverhangMetrics", [Out(Pointer(DWRITE_OVERHANG_METRICS), "overhangs")]), |
| 707 | StdMethod(HRESULT, "GetClusterMetrics", [Out(Pointer(DWRITE_CLUSTER_METRICS), "clusterMetrics"), (UINT32, "maxClusterCount"), Out(Pointer(UINT32), "actualClusterCount")]), |
| 708 | StdMethod(HRESULT, "DetermineMinWidth", [Out(Pointer(FLOAT), "minWidth")]), |
| 709 | StdMethod(HRESULT, "HitTestPoint", [(FLOAT, "pointX"), (FLOAT, "pointY"), Out(Pointer(BOOL), "isTrailingHit"), Out(Pointer(BOOL), "isInside"), Out(Pointer(DWRITE_HIT_TEST_METRICS), "hitTestMetrics")]), |
| 710 | StdMethod(HRESULT, "HitTestTextPosition", [(UINT32, "textPosition"), (BOOL, "isTrailingHit"), Out(Pointer(FLOAT), "pointX"), Out(Pointer(FLOAT), "pointY"), Out(Pointer(DWRITE_HIT_TEST_METRICS), "hitTestMetrics")]), |
| 711 | StdMethod(HRESULT, "HitTestTextRange", [(UINT32, "textPosition"), (UINT32, "textLength"), (FLOAT, "originX"), (FLOAT, "originY"), Out(Pointer(DWRITE_HIT_TEST_METRICS), "hitTestMetrics"), (UINT32, "maxHitTestMetricsCount"), Out(Pointer(UINT32), "actualHitTestMetricsCount")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 712 | ] |
| 713 | |
| 714 | IDWriteBitmapRenderTarget.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 715 | StdMethod(HRESULT, "DrawGlyphRun", [(FLOAT, "baselineOriginX"), (FLOAT, "baselineOriginY"), (DWRITE_MEASURING_MODE, "measuringMode"), (Pointer(Const(DWRITE_GLYPH_RUN)), "glyphRun"), (ObjPointer(IDWriteRenderingParams), "renderingParams"), (COLORREF, "textColor"), Out(Pointer(RECT), "blackBoxRect")]), |
| 716 | StdMethod(HDC, "GetMemoryDC", []), |
| 717 | StdMethod(FLOAT, "GetPixelsPerDip", []), |
| 718 | StdMethod(HRESULT, "SetPixelsPerDip", [(FLOAT, "pixelsPerDip")]), |
| 719 | StdMethod(HRESULT, "GetCurrentTransform", [Out(Pointer(DWRITE_MATRIX), "transform")]), |
| 720 | StdMethod(HRESULT, "SetCurrentTransform", [(Pointer(Const(DWRITE_MATRIX)), "transform")]), |
| 721 | StdMethod(HRESULT, "GetSize", [Out(Pointer(SIZE), "size")]), |
| 722 | StdMethod(HRESULT, "Resize", [(UINT32, "width"), (UINT32, "height")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 723 | ] |
| 724 | |
| 725 | IDWriteGdiInterop.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 726 | StdMethod(HRESULT, "CreateFontFromLOGFONT", [(Pointer(Const(LOGFONTW)), "logFont"), Out(Pointer(ObjPointer(IDWriteFont)), "font")]), |
| 727 | StdMethod(HRESULT, "ConvertFontToLOGFONT", [(ObjPointer(IDWriteFont), "font"), Out(Pointer(LOGFONTW), "logFont"), Out(Pointer(BOOL), "isSystemFont")]), |
| 728 | StdMethod(HRESULT, "ConvertFontFaceToLOGFONT", [(ObjPointer(IDWriteFontFace), "font"), Out(Pointer(LOGFONTW), "logFont")]), |
| 729 | StdMethod(HRESULT, "CreateFontFaceFromHdc", [(HDC, "hdc"), Out(Pointer(ObjPointer(IDWriteFontFace)), "fontFace")]), |
| 730 | StdMethod(HRESULT, "CreateBitmapRenderTarget", [(HDC, "hdc"), (UINT32, "width"), (UINT32, "height"), Out(Pointer(ObjPointer(IDWriteBitmapRenderTarget)), "renderTarget")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 731 | ] |
| 732 | |
| 733 | DWRITE_TEXTURE_TYPE = Enum("DWRITE_TEXTURE_TYPE", [ |
| 734 | "DWRITE_TEXTURE_ALIASED_1x1", |
| 735 | "DWRITE_TEXTURE_CLEARTYPE_3x1", |
| 736 | ]) |
| 737 | |
| 738 | IDWriteGlyphRunAnalysis.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 739 | StdMethod(HRESULT, "GetAlphaTextureBounds", [(DWRITE_TEXTURE_TYPE, "textureType"), Out(Pointer(RECT), "textureBounds")]), |
| 740 | StdMethod(HRESULT, "CreateAlphaTexture", [(DWRITE_TEXTURE_TYPE, "textureType"), (Pointer(Const(RECT)), "textureBounds"), Out(Pointer(BYTE), "alphaValues"), (UINT32, "bufferSize")]), |
| 741 | StdMethod(HRESULT, "GetAlphaBlendParams", [(ObjPointer(IDWriteRenderingParams), "renderingParams"), Out(Pointer(FLOAT), "blendGamma"), Out(Pointer(FLOAT), "blendEnhancedContrast"), Out(Pointer(FLOAT), "blendClearTypeLevel")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 742 | ] |
| 743 | |
| 744 | IDWriteFactory.methods += [ |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 745 | StdMethod(HRESULT, "GetSystemFontCollection", [Out(Pointer(ObjPointer(IDWriteFontCollection)), "fontCollection"), (BOOL, "checkForUpdates")]), |
| 746 | StdMethod(HRESULT, "CreateCustomFontCollection", [(ObjPointer(IDWriteFontCollectionLoader), "collectionLoader"), (OpaquePointer(Const(Void)), "collectionKey"), (UINT32, "collectionKeySize"), Out(Pointer(ObjPointer(IDWriteFontCollection)), "fontCollection")]), |
| 747 | StdMethod(HRESULT, "RegisterFontCollectionLoader", [(ObjPointer(IDWriteFontCollectionLoader), "fontCollectionLoader")]), |
| 748 | StdMethod(HRESULT, "UnregisterFontCollectionLoader", [(ObjPointer(IDWriteFontCollectionLoader), "fontCollectionLoader")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 749 | StdMethod(HRESULT, "CreateFontFileReference", [(PCWSTR, "filePath"), (Pointer(Const(FILETIME)), "lastWriteTime"), Out(Pointer(ObjPointer(IDWriteFontFile)), "fontFile")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 750 | StdMethod(HRESULT, "CreateCustomFontFileReference", [(OpaquePointer(Const(Void)), "fontFileReferenceKey"), (UINT32, "fontFileReferenceKeySize"), (ObjPointer(IDWriteFontFileLoader), "fontFileLoader"), Out(Pointer(ObjPointer(IDWriteFontFile)), "fontFile")]), |
| 751 | StdMethod(HRESULT, "CreateFontFace", [(DWRITE_FONT_FACE_TYPE, "fontFaceType"), (UINT32, "numberOfFiles"), (Array(Const(ObjPointer(IDWriteFontFile)), "numberOfFiles"), "fontFiles"), (UINT32, "faceIndex"), (DWRITE_FONT_SIMULATIONS, "fontFaceSimulationFlags"), Out(Pointer(ObjPointer(IDWriteFontFace)), "fontFace")]), |
| 752 | StdMethod(HRESULT, "CreateRenderingParams", [Out(Pointer(ObjPointer(IDWriteRenderingParams)), "renderingParams")]), |
| 753 | StdMethod(HRESULT, "CreateMonitorRenderingParams", [(HMONITOR, "monitor"), Out(Pointer(ObjPointer(IDWriteRenderingParams)), "renderingParams")]), |
| 754 | StdMethod(HRESULT, "CreateCustomRenderingParams", [(FLOAT, "gamma"), (FLOAT, "enhancedContrast"), (FLOAT, "clearTypeLevel"), (DWRITE_PIXEL_GEOMETRY, "pixelGeometry"), (DWRITE_RENDERING_MODE, "renderingMode"), Out(Pointer(ObjPointer(IDWriteRenderingParams)), "renderingParams")]), |
| 755 | StdMethod(HRESULT, "RegisterFontFileLoader", [(ObjPointer(IDWriteFontFileLoader), "fontFileLoader")]), |
| 756 | StdMethod(HRESULT, "UnregisterFontFileLoader", [(ObjPointer(IDWriteFontFileLoader), "fontFileLoader")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 757 | StdMethod(HRESULT, "CreateTextFormat", [(PCWSTR, "fontFamilyName"), (ObjPointer(IDWriteFontCollection), "fontCollection"), (DWRITE_FONT_WEIGHT, "fontWeight"), (DWRITE_FONT_STYLE, "fontStyle"), (DWRITE_FONT_STRETCH, "fontStretch"), (FLOAT, "fontSize"), (PCWSTR, "localeName"), Out(Pointer(ObjPointer(IDWriteTextFormat)), "textFormat")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 758 | StdMethod(HRESULT, "CreateTypography", [Out(Pointer(ObjPointer(IDWriteTypography)), "typography")]), |
| 759 | StdMethod(HRESULT, "GetGdiInterop", [Out(Pointer(ObjPointer(IDWriteGdiInterop)), "gdiInterop")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 760 | StdMethod(HRESULT, "CreateTextLayout", [(String(Const(WCHAR), "stringLength", wide=True), "string"), (UINT32, "stringLength"), (ObjPointer(IDWriteTextFormat), "textFormat"), (FLOAT, "maxWidth"), (FLOAT, "maxHeight"), Out(Pointer(ObjPointer(IDWriteTextLayout)), "textLayout")]), |
| 761 | StdMethod(HRESULT, "CreateGdiCompatibleTextLayout", [(String(Const(WCHAR), "stringLength", wide=True), "string"), (UINT32, "stringLength"), (ObjPointer(IDWriteTextFormat), "textFormat"), (FLOAT, "layoutWidth"), (FLOAT, "layoutHeight"), (FLOAT, "pixelsPerDip"), (Pointer(Const(DWRITE_MATRIX)), "transform"), (BOOL, "useGdiNatural"), Out(Pointer(ObjPointer(IDWriteTextLayout)), "textLayout")]), |
| 762 | StdMethod(HRESULT, "CreateEllipsisTrimmingSign", [(ObjPointer(IDWriteTextFormat), "textFormat"), Out(Pointer(OpaquePointer(IDWriteInlineObject)), "trimmingSign")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 763 | StdMethod(HRESULT, "CreateTextAnalyzer", [Out(Pointer(ObjPointer(IDWriteTextAnalyzer)), "textAnalyzer")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 764 | StdMethod(HRESULT, "CreateNumberSubstitution", [(DWRITE_NUMBER_SUBSTITUTION_METHOD, "substitutionMethod"), (PCWSTR, "localeName"), (BOOL, "ignoreUserOverride"), Out(Pointer(ObjPointer(IDWriteNumberSubstitution)), "numberSubstitution")]), |
José Fonseca | 43aa19f | 2012-11-10 09:29:38 +0000 | [diff] [blame] | 765 | StdMethod(HRESULT, "CreateGlyphRunAnalysis", [(Pointer(Const(DWRITE_GLYPH_RUN)), "glyphRun"), (FLOAT, "pixelsPerDip"), (Pointer(Const(DWRITE_MATRIX)), "transform"), (DWRITE_RENDERING_MODE, "renderingMode"), (DWRITE_MEASURING_MODE, "measuringMode"), (FLOAT, "baselineOriginX"), (FLOAT, "baselineOriginY"), Out(Pointer(ObjPointer(IDWriteGlyphRunAnalysis)), "glyphRunAnalysis")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 766 | ] |
| 767 | |
José Fonseca | 8130193 | 2012-11-11 00:10:20 +0000 | [diff] [blame] | 768 | dwrite = Module("dwrite") |
| 769 | dwrite.addInterfaces([ |
| 770 | IDWriteFactory |
| 771 | ]) |
José Fonseca | 48412ff | 2012-01-21 00:06:19 +0000 | [diff] [blame] | 772 | dwrite.addFunctions([ |
José Fonseca | e7cb2b9 | 2012-09-28 08:40:24 +0100 | [diff] [blame] | 773 | StdFunction(HRESULT, "DWriteCreateFactory", [(DWRITE_FACTORY_TYPE, "factoryType"), (REFIID, "iid"), Out(Pointer(ObjPointer(IUnknown)), "factory")]), |
José Fonseca | 31f2b6e | 2011-10-10 01:45:04 +0100 | [diff] [blame] | 774 | ]) |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 775 | |
| 776 | |
| 777 | # |
| 778 | # dwrite_1 |
| 779 | # |
| 780 | |
| 781 | |
| 782 | DWRITE_PANOSE_FAMILY = Enum("DWRITE_PANOSE_FAMILY", [ |
| 783 | "DWRITE_PANOSE_FAMILY_ANY", |
| 784 | "DWRITE_PANOSE_FAMILY_NO_FIT", |
| 785 | "DWRITE_PANOSE_FAMILY_TEXT_DISPLAY", |
| 786 | "DWRITE_PANOSE_FAMILY_SCRIPT", |
| 787 | "DWRITE_PANOSE_FAMILY_DECORATIVE", |
| 788 | "DWRITE_PANOSE_FAMILY_SYMBOL", |
| 789 | "DWRITE_PANOSE_FAMILY_PICTORIAL", |
| 790 | ]) |
| 791 | |
| 792 | DWRITE_PANOSE_SERIF_STYLE = Enum("DWRITE_PANOSE_SERIF_STYLE", [ |
| 793 | "DWRITE_PANOSE_SERIF_STYLE_ANY", |
| 794 | "DWRITE_PANOSE_SERIF_STYLE_NO_FIT", |
| 795 | "DWRITE_PANOSE_SERIF_STYLE_COVE", |
| 796 | "DWRITE_PANOSE_SERIF_STYLE_OBTUSE_COVE", |
| 797 | "DWRITE_PANOSE_SERIF_STYLE_SQUARE_COVE", |
| 798 | "DWRITE_PANOSE_SERIF_STYLE_OBTUSE_SQUARE_COVE", |
| 799 | "DWRITE_PANOSE_SERIF_STYLE_SQUARE", |
| 800 | "DWRITE_PANOSE_SERIF_STYLE_THIN", |
| 801 | "DWRITE_PANOSE_SERIF_STYLE_OVAL", |
| 802 | "DWRITE_PANOSE_SERIF_STYLE_EXAGGERATED", |
| 803 | "DWRITE_PANOSE_SERIF_STYLE_TRIANGLE", |
| 804 | "DWRITE_PANOSE_SERIF_STYLE_NORMAL_SANS", |
| 805 | "DWRITE_PANOSE_SERIF_STYLE_OBTUSE_SANS", |
| 806 | "DWRITE_PANOSE_SERIF_STYLE_PERPENDICULAR_SANS", |
| 807 | "DWRITE_PANOSE_SERIF_STYLE_FLARED", |
| 808 | "DWRITE_PANOSE_SERIF_STYLE_ROUNDED", |
| 809 | "DWRITE_PANOSE_SERIF_STYLE_SCRIPT", |
| 810 | "DWRITE_PANOSE_SERIF_STYLE_PERP_SANS", |
| 811 | "DWRITE_PANOSE_SERIF_STYLE_BONE", |
| 812 | ]) |
| 813 | |
| 814 | DWRITE_PANOSE_WEIGHT = Enum("DWRITE_PANOSE_WEIGHT", [ |
| 815 | "DWRITE_PANOSE_WEIGHT_ANY", |
| 816 | "DWRITE_PANOSE_WEIGHT_NO_FIT", |
| 817 | "DWRITE_PANOSE_WEIGHT_VERY_LIGHT", |
| 818 | "DWRITE_PANOSE_WEIGHT_LIGHT", |
| 819 | "DWRITE_PANOSE_WEIGHT_THIN", |
| 820 | "DWRITE_PANOSE_WEIGHT_BOOK", |
| 821 | "DWRITE_PANOSE_WEIGHT_MEDIUM", |
| 822 | "DWRITE_PANOSE_WEIGHT_DEMI", |
| 823 | "DWRITE_PANOSE_WEIGHT_BOLD", |
| 824 | "DWRITE_PANOSE_WEIGHT_HEAVY", |
| 825 | "DWRITE_PANOSE_WEIGHT_BLACK", |
| 826 | "DWRITE_PANOSE_WEIGHT_EXTRA_BLACK", |
| 827 | "DWRITE_PANOSE_WEIGHT_NORD", |
| 828 | ]) |
| 829 | |
| 830 | DWRITE_PANOSE_PROPORTION = Enum("DWRITE_PANOSE_PROPORTION", [ |
| 831 | "DWRITE_PANOSE_PROPORTION_ANY", |
| 832 | "DWRITE_PANOSE_PROPORTION_NO_FIT", |
| 833 | "DWRITE_PANOSE_PROPORTION_OLD_STYLE", |
| 834 | "DWRITE_PANOSE_PROPORTION_MODERN", |
| 835 | "DWRITE_PANOSE_PROPORTION_EVEN_WIDTH", |
| 836 | "DWRITE_PANOSE_PROPORTION_EXPANDED", |
| 837 | "DWRITE_PANOSE_PROPORTION_CONDENSED", |
| 838 | "DWRITE_PANOSE_PROPORTION_VERY_EXPANDED", |
| 839 | "DWRITE_PANOSE_PROPORTION_VERY_CONDENSED", |
| 840 | "DWRITE_PANOSE_PROPORTION_MONOSPACED", |
| 841 | ]) |
| 842 | |
| 843 | DWRITE_PANOSE_CONTRAST = Enum("DWRITE_PANOSE_CONTRAST", [ |
| 844 | "DWRITE_PANOSE_CONTRAST_ANY", |
| 845 | "DWRITE_PANOSE_CONTRAST_NO_FIT", |
| 846 | "DWRITE_PANOSE_CONTRAST_NONE", |
| 847 | "DWRITE_PANOSE_CONTRAST_VERY_LOW", |
| 848 | "DWRITE_PANOSE_CONTRAST_LOW", |
| 849 | "DWRITE_PANOSE_CONTRAST_MEDIUM_LOW", |
| 850 | "DWRITE_PANOSE_CONTRAST_MEDIUM", |
| 851 | "DWRITE_PANOSE_CONTRAST_MEDIUM_HIGH", |
| 852 | "DWRITE_PANOSE_CONTRAST_HIGH", |
| 853 | "DWRITE_PANOSE_CONTRAST_VERY_HIGH", |
| 854 | "DWRITE_PANOSE_CONTRAST_HORIZONTAL_LOW", |
| 855 | "DWRITE_PANOSE_CONTRAST_HORIZONTAL_MEDIUM", |
| 856 | "DWRITE_PANOSE_CONTRAST_HORIZONTAL_HIGH", |
| 857 | "DWRITE_PANOSE_CONTRAST_BROKEN", |
| 858 | ]) |
| 859 | |
| 860 | DWRITE_PANOSE_STROKE_VARIATION = Enum("DWRITE_PANOSE_STROKE_VARIATION", [ |
| 861 | "DWRITE_PANOSE_STROKE_VARIATION_ANY", |
| 862 | "DWRITE_PANOSE_STROKE_VARIATION_NO_FIT", |
| 863 | "DWRITE_PANOSE_STROKE_VARIATION_NO_VARIATION", |
| 864 | "DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_DIAGONAL", |
| 865 | "DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_TRANSITIONAL", |
| 866 | "DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_VERTICAL", |
| 867 | "DWRITE_PANOSE_STROKE_VARIATION_GRADUAL_HORIZONTAL", |
| 868 | "DWRITE_PANOSE_STROKE_VARIATION_RAPID_VERTICAL", |
| 869 | "DWRITE_PANOSE_STROKE_VARIATION_RAPID_HORIZONTAL", |
| 870 | "DWRITE_PANOSE_STROKE_VARIATION_INSTANT_VERTICAL", |
| 871 | "DWRITE_PANOSE_STROKE_VARIATION_INSTANT_HORIZONTAL", |
| 872 | ]) |
| 873 | |
| 874 | DWRITE_PANOSE_ARM_STYLE = Enum("DWRITE_PANOSE_ARM_STYLE", [ |
| 875 | "DWRITE_PANOSE_ARM_STYLE_ANY", |
| 876 | "DWRITE_PANOSE_ARM_STYLE_NO_FIT", |
| 877 | "DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_HORIZONTAL", |
| 878 | "DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_WEDGE", |
| 879 | "DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_VERTICAL", |
| 880 | "DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_SINGLE_SERIF", |
| 881 | "DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_DOUBLE_SERIF", |
| 882 | "DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_HORIZONTAL", |
| 883 | "DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_WEDGE", |
| 884 | "DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_VERTICAL", |
| 885 | "DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_SINGLE_SERIF", |
| 886 | "DWRITE_PANOSE_ARM_STYLE_NONSTRAIGHT_ARMS_DOUBLE_SERIF", |
| 887 | "DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_HORZ", |
| 888 | "DWRITE_PANOSE_ARM_STYLE_STRAIGHT_ARMS_VERT", |
| 889 | "DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_HORZ", |
| 890 | "DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_WEDGE", |
| 891 | "DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_VERT", |
| 892 | "DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_SINGLE_SERIF", |
| 893 | "DWRITE_PANOSE_ARM_STYLE_BENT_ARMS_DOUBLE_SERIF", |
| 894 | ]) |
| 895 | |
| 896 | DWRITE_PANOSE_LETTERFORM = Enum("DWRITE_PANOSE_LETTERFORM", [ |
| 897 | "DWRITE_PANOSE_LETTERFORM_ANY", |
| 898 | "DWRITE_PANOSE_LETTERFORM_NO_FIT", |
| 899 | "DWRITE_PANOSE_LETTERFORM_NORMAL_CONTACT", |
| 900 | "DWRITE_PANOSE_LETTERFORM_NORMAL_WEIGHTED", |
| 901 | "DWRITE_PANOSE_LETTERFORM_NORMAL_BOXED", |
| 902 | "DWRITE_PANOSE_LETTERFORM_NORMAL_FLATTENED", |
| 903 | "DWRITE_PANOSE_LETTERFORM_NORMAL_ROUNDED", |
| 904 | "DWRITE_PANOSE_LETTERFORM_NORMAL_OFF_CENTER", |
| 905 | "DWRITE_PANOSE_LETTERFORM_NORMAL_SQUARE", |
| 906 | "DWRITE_PANOSE_LETTERFORM_OBLIQUE_CONTACT", |
| 907 | "DWRITE_PANOSE_LETTERFORM_OBLIQUE_WEIGHTED", |
| 908 | "DWRITE_PANOSE_LETTERFORM_OBLIQUE_BOXED", |
| 909 | "DWRITE_PANOSE_LETTERFORM_OBLIQUE_FLATTENED", |
| 910 | "DWRITE_PANOSE_LETTERFORM_OBLIQUE_ROUNDED", |
| 911 | "DWRITE_PANOSE_LETTERFORM_OBLIQUE_OFF_CENTER", |
| 912 | "DWRITE_PANOSE_LETTERFORM_OBLIQUE_SQUARE", |
| 913 | ]) |
| 914 | |
| 915 | DWRITE_PANOSE_MIDLINE = Enum("DWRITE_PANOSE_MIDLINE", [ |
| 916 | "DWRITE_PANOSE_MIDLINE_ANY", |
| 917 | "DWRITE_PANOSE_MIDLINE_NO_FIT", |
| 918 | "DWRITE_PANOSE_MIDLINE_STANDARD_TRIMMED", |
| 919 | "DWRITE_PANOSE_MIDLINE_STANDARD_POINTED", |
| 920 | "DWRITE_PANOSE_MIDLINE_STANDARD_SERIFED", |
| 921 | "DWRITE_PANOSE_MIDLINE_HIGH_TRIMMED", |
| 922 | "DWRITE_PANOSE_MIDLINE_HIGH_POINTED", |
| 923 | "DWRITE_PANOSE_MIDLINE_HIGH_SERIFED", |
| 924 | "DWRITE_PANOSE_MIDLINE_CONSTANT_TRIMMED", |
| 925 | "DWRITE_PANOSE_MIDLINE_CONSTANT_POINTED", |
| 926 | "DWRITE_PANOSE_MIDLINE_CONSTANT_SERIFED", |
| 927 | "DWRITE_PANOSE_MIDLINE_LOW_TRIMMED", |
| 928 | "DWRITE_PANOSE_MIDLINE_LOW_POINTED", |
| 929 | "DWRITE_PANOSE_MIDLINE_LOW_SERIFED", |
| 930 | ]) |
| 931 | |
| 932 | DWRITE_PANOSE_XHEIGHT = Enum("DWRITE_PANOSE_XHEIGHT", [ |
| 933 | "DWRITE_PANOSE_XHEIGHT_ANY", |
| 934 | "DWRITE_PANOSE_XHEIGHT_NO_FIT", |
| 935 | "DWRITE_PANOSE_XHEIGHT_CONSTANT_SMALL", |
| 936 | "DWRITE_PANOSE_XHEIGHT_CONSTANT_STANDARD", |
| 937 | "DWRITE_PANOSE_XHEIGHT_CONSTANT_LARGE", |
| 938 | "DWRITE_PANOSE_XHEIGHT_DUCKING_SMALL", |
| 939 | "DWRITE_PANOSE_XHEIGHT_DUCKING_STANDARD", |
| 940 | "DWRITE_PANOSE_XHEIGHT_DUCKING_LARGE", |
| 941 | "DWRITE_PANOSE_XHEIGHT_CONSTANT_STD", |
| 942 | "DWRITE_PANOSE_XHEIGHT_DUCKING_STD", |
| 943 | ]) |
| 944 | |
| 945 | DWRITE_PANOSE_TOOL_KIND = Enum("DWRITE_PANOSE_TOOL_KIND", [ |
| 946 | "DWRITE_PANOSE_TOOL_KIND_ANY", |
| 947 | "DWRITE_PANOSE_TOOL_KIND_NO_FIT", |
| 948 | "DWRITE_PANOSE_TOOL_KIND_FLAT_NIB", |
| 949 | "DWRITE_PANOSE_TOOL_KIND_PRESSURE_POINT", |
| 950 | "DWRITE_PANOSE_TOOL_KIND_ENGRAVED", |
| 951 | "DWRITE_PANOSE_TOOL_KIND_BALL", |
| 952 | "DWRITE_PANOSE_TOOL_KIND_BRUSH", |
| 953 | "DWRITE_PANOSE_TOOL_KIND_ROUGH", |
| 954 | "DWRITE_PANOSE_TOOL_KIND_FELT_PEN_BRUSH_TIP", |
| 955 | "DWRITE_PANOSE_TOOL_KIND_WILD_BRUSH", |
| 956 | ]) |
| 957 | |
| 958 | DWRITE_PANOSE_SPACING = Enum("DWRITE_PANOSE_SPACING", [ |
| 959 | "DWRITE_PANOSE_SPACING_ANY", |
| 960 | "DWRITE_PANOSE_SPACING_NO_FIT", |
| 961 | "DWRITE_PANOSE_SPACING_PROPORTIONAL_SPACED", |
| 962 | "DWRITE_PANOSE_SPACING_MONOSPACED", |
| 963 | ]) |
| 964 | |
| 965 | DWRITE_PANOSE_ASPECT_RATIO = Enum("DWRITE_PANOSE_ASPECT_RATIO", [ |
| 966 | "DWRITE_PANOSE_ASPECT_RATIO_ANY", |
| 967 | "DWRITE_PANOSE_ASPECT_RATIO_NO_FIT", |
| 968 | "DWRITE_PANOSE_ASPECT_RATIO_VERY_CONDENSED", |
| 969 | "DWRITE_PANOSE_ASPECT_RATIO_CONDENSED", |
| 970 | "DWRITE_PANOSE_ASPECT_RATIO_NORMAL", |
| 971 | "DWRITE_PANOSE_ASPECT_RATIO_EXPANDED", |
| 972 | "DWRITE_PANOSE_ASPECT_RATIO_VERY_EXPANDED", |
| 973 | ]) |
| 974 | |
| 975 | DWRITE_PANOSE_SCRIPT_TOPOLOGY = Enum("DWRITE_PANOSE_SCRIPT_TOPOLOGY", [ |
| 976 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_ANY", |
| 977 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_NO_FIT", |
| 978 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_DISCONNECTED", |
| 979 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_TRAILING", |
| 980 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_ROMAN_CONNECTED", |
| 981 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_DISCONNECTED", |
| 982 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_TRAILING", |
| 983 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_CURSIVE_CONNECTED", |
| 984 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_DISCONNECTED", |
| 985 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_TRAILING", |
| 986 | "DWRITE_PANOSE_SCRIPT_TOPOLOGY_BLACKLETTER_CONNECTED", |
| 987 | ]) |
| 988 | |
| 989 | DWRITE_PANOSE_SCRIPT_FORM = Enum("DWRITE_PANOSE_SCRIPT_FORM", [ |
| 990 | "DWRITE_PANOSE_SCRIPT_FORM_ANY", |
| 991 | "DWRITE_PANOSE_SCRIPT_FORM_NO_FIT", |
| 992 | "DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_NO_WRAPPING", |
| 993 | "DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_SOME_WRAPPING", |
| 994 | "DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_MORE_WRAPPING", |
| 995 | "DWRITE_PANOSE_SCRIPT_FORM_UPRIGHT_EXTREME_WRAPPING", |
| 996 | "DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_NO_WRAPPING", |
| 997 | "DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_SOME_WRAPPING", |
| 998 | "DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_MORE_WRAPPING", |
| 999 | "DWRITE_PANOSE_SCRIPT_FORM_OBLIQUE_EXTREME_WRAPPING", |
| 1000 | "DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_NO_WRAPPING", |
| 1001 | "DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_SOME_WRAPPING", |
| 1002 | "DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_MORE_WRAPPING", |
| 1003 | "DWRITE_PANOSE_SCRIPT_FORM_EXAGGERATED_EXTREME_WRAPPING", |
| 1004 | ]) |
| 1005 | |
| 1006 | DWRITE_PANOSE_FINIALS = Enum("DWRITE_PANOSE_FINIALS", [ |
| 1007 | "DWRITE_PANOSE_FINIALS_ANY", |
| 1008 | "DWRITE_PANOSE_FINIALS_NO_FIT", |
| 1009 | "DWRITE_PANOSE_FINIALS_NONE_NO_LOOPS", |
| 1010 | "DWRITE_PANOSE_FINIALS_NONE_CLOSED_LOOPS", |
| 1011 | "DWRITE_PANOSE_FINIALS_NONE_OPEN_LOOPS", |
| 1012 | "DWRITE_PANOSE_FINIALS_SHARP_NO_LOOPS", |
| 1013 | "DWRITE_PANOSE_FINIALS_SHARP_CLOSED_LOOPS", |
| 1014 | "DWRITE_PANOSE_FINIALS_SHARP_OPEN_LOOPS", |
| 1015 | "DWRITE_PANOSE_FINIALS_TAPERED_NO_LOOPS", |
| 1016 | "DWRITE_PANOSE_FINIALS_TAPERED_CLOSED_LOOPS", |
| 1017 | "DWRITE_PANOSE_FINIALS_TAPERED_OPEN_LOOPS", |
| 1018 | "DWRITE_PANOSE_FINIALS_ROUND_NO_LOOPS", |
| 1019 | "DWRITE_PANOSE_FINIALS_ROUND_CLOSED_LOOPS", |
| 1020 | "DWRITE_PANOSE_FINIALS_ROUND_OPEN_LOOPS", |
| 1021 | ]) |
| 1022 | |
| 1023 | DWRITE_PANOSE_XASCENT = Enum("DWRITE_PANOSE_XASCENT", [ |
| 1024 | "DWRITE_PANOSE_XASCENT_ANY", |
| 1025 | "DWRITE_PANOSE_XASCENT_NO_FIT", |
| 1026 | "DWRITE_PANOSE_XASCENT_VERY_LOW", |
| 1027 | "DWRITE_PANOSE_XASCENT_LOW", |
| 1028 | "DWRITE_PANOSE_XASCENT_MEDIUM", |
| 1029 | "DWRITE_PANOSE_XASCENT_HIGH", |
| 1030 | "DWRITE_PANOSE_XASCENT_VERY_HIGH", |
| 1031 | ]) |
| 1032 | |
| 1033 | DWRITE_PANOSE_DECORATIVE_CLASS = Enum("DWRITE_PANOSE_DECORATIVE_CLASS", [ |
| 1034 | "DWRITE_PANOSE_DECORATIVE_CLASS_ANY", |
| 1035 | "DWRITE_PANOSE_DECORATIVE_CLASS_NO_FIT", |
| 1036 | "DWRITE_PANOSE_DECORATIVE_CLASS_DERIVATIVE", |
| 1037 | "DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_TOPOLOGY", |
| 1038 | "DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_ELEMENTS", |
| 1039 | "DWRITE_PANOSE_DECORATIVE_CLASS_NONSTANDARD_ASPECT", |
| 1040 | "DWRITE_PANOSE_DECORATIVE_CLASS_INITIALS", |
| 1041 | "DWRITE_PANOSE_DECORATIVE_CLASS_CARTOON", |
| 1042 | "DWRITE_PANOSE_DECORATIVE_CLASS_PICTURE_STEMS", |
| 1043 | "DWRITE_PANOSE_DECORATIVE_CLASS_ORNAMENTED", |
| 1044 | "DWRITE_PANOSE_DECORATIVE_CLASS_TEXT_AND_BACKGROUND", |
| 1045 | "DWRITE_PANOSE_DECORATIVE_CLASS_COLLAGE", |
| 1046 | "DWRITE_PANOSE_DECORATIVE_CLASS_MONTAGE", |
| 1047 | ]) |
| 1048 | |
| 1049 | DWRITE_PANOSE_ASPECT = Enum("DWRITE_PANOSE_ASPECT", [ |
| 1050 | "DWRITE_PANOSE_ASPECT_ANY", |
| 1051 | "DWRITE_PANOSE_ASPECT_NO_FIT", |
| 1052 | "DWRITE_PANOSE_ASPECT_SUPER_CONDENSED", |
| 1053 | "DWRITE_PANOSE_ASPECT_VERY_CONDENSED", |
| 1054 | "DWRITE_PANOSE_ASPECT_CONDENSED", |
| 1055 | "DWRITE_PANOSE_ASPECT_NORMAL", |
| 1056 | "DWRITE_PANOSE_ASPECT_EXTENDED", |
| 1057 | "DWRITE_PANOSE_ASPECT_VERY_EXTENDED", |
| 1058 | "DWRITE_PANOSE_ASPECT_SUPER_EXTENDED", |
| 1059 | "DWRITE_PANOSE_ASPECT_MONOSPACED", |
| 1060 | ]) |
| 1061 | |
| 1062 | DWRITE_PANOSE_FILL = Enum("DWRITE_PANOSE_FILL", [ |
| 1063 | "DWRITE_PANOSE_FILL_ANY", |
| 1064 | "DWRITE_PANOSE_FILL_NO_FIT", |
| 1065 | "DWRITE_PANOSE_FILL_STANDARD_SOLID_FILL", |
| 1066 | "DWRITE_PANOSE_FILL_NO_FILL", |
| 1067 | "DWRITE_PANOSE_FILL_PATTERNED_FILL", |
| 1068 | "DWRITE_PANOSE_FILL_COMPLEX_FILL", |
| 1069 | "DWRITE_PANOSE_FILL_SHAPED_FILL", |
| 1070 | "DWRITE_PANOSE_FILL_DRAWN_DISTRESSED", |
| 1071 | ]) |
| 1072 | |
| 1073 | DWRITE_PANOSE_LINING = Enum("DWRITE_PANOSE_LINING", [ |
| 1074 | "DWRITE_PANOSE_LINING_ANY", |
| 1075 | "DWRITE_PANOSE_LINING_NO_FIT", |
| 1076 | "DWRITE_PANOSE_LINING_NONE", |
| 1077 | "DWRITE_PANOSE_LINING_INLINE", |
| 1078 | "DWRITE_PANOSE_LINING_OUTLINE", |
| 1079 | "DWRITE_PANOSE_LINING_ENGRAVED", |
| 1080 | "DWRITE_PANOSE_LINING_SHADOW", |
| 1081 | "DWRITE_PANOSE_LINING_RELIEF", |
| 1082 | "DWRITE_PANOSE_LINING_BACKDROP", |
| 1083 | ]) |
| 1084 | |
| 1085 | DWRITE_PANOSE_DECORATIVE_TOPOLOGY = Enum("DWRITE_PANOSE_DECORATIVE_TOPOLOGY", [ |
| 1086 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_ANY", |
| 1087 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_NO_FIT", |
| 1088 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_STANDARD", |
| 1089 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_SQUARE", |
| 1090 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_MULTIPLE_SEGMENT", |
| 1091 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_ART_DECO", |
| 1092 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_UNEVEN_WEIGHTING", |
| 1093 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_DIVERSE_ARMS", |
| 1094 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_DIVERSE_FORMS", |
| 1095 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_LOMBARDIC_FORMS", |
| 1096 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_UPPER_CASE_IN_LOWER_CASE", |
| 1097 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_IMPLIED_TOPOLOGY", |
| 1098 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_HORSESHOE_E_AND_A", |
| 1099 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_CURSIVE", |
| 1100 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_BLACKLETTER", |
| 1101 | "DWRITE_PANOSE_DECORATIVE_TOPOLOGY_SWASH_VARIANCE", |
| 1102 | ]) |
| 1103 | |
| 1104 | DWRITE_PANOSE_CHARACTER_RANGES = Enum("DWRITE_PANOSE_CHARACTER_RANGES", [ |
| 1105 | "DWRITE_PANOSE_CHARACTER_RANGES_ANY", |
| 1106 | "DWRITE_PANOSE_CHARACTER_RANGES_NO_FIT", |
| 1107 | "DWRITE_PANOSE_CHARACTER_RANGES_EXTENDED_COLLECTION", |
| 1108 | "DWRITE_PANOSE_CHARACTER_RANGES_LITERALS", |
| 1109 | "DWRITE_PANOSE_CHARACTER_RANGES_NO_LOWER_CASE", |
| 1110 | "DWRITE_PANOSE_CHARACTER_RANGES_SMALL_CAPS", |
| 1111 | ]) |
| 1112 | |
| 1113 | DWRITE_PANOSE_SYMBOL_KIND = Enum("DWRITE_PANOSE_SYMBOL_KIND", [ |
| 1114 | "DWRITE_PANOSE_SYMBOL_KIND_ANY", |
| 1115 | "DWRITE_PANOSE_SYMBOL_KIND_NO_FIT", |
| 1116 | "DWRITE_PANOSE_SYMBOL_KIND_MONTAGES", |
| 1117 | "DWRITE_PANOSE_SYMBOL_KIND_PICTURES", |
| 1118 | "DWRITE_PANOSE_SYMBOL_KIND_SHAPES", |
| 1119 | "DWRITE_PANOSE_SYMBOL_KIND_SCIENTIFIC", |
| 1120 | "DWRITE_PANOSE_SYMBOL_KIND_MUSIC", |
| 1121 | "DWRITE_PANOSE_SYMBOL_KIND_EXPERT", |
| 1122 | "DWRITE_PANOSE_SYMBOL_KIND_PATTERNS", |
| 1123 | "DWRITE_PANOSE_SYMBOL_KIND_BOARDERS", |
| 1124 | "DWRITE_PANOSE_SYMBOL_KIND_ICONS", |
| 1125 | "DWRITE_PANOSE_SYMBOL_KIND_LOGOS", |
| 1126 | "DWRITE_PANOSE_SYMBOL_KIND_INDUSTRY_SPECIFIC", |
| 1127 | ]) |
| 1128 | |
| 1129 | DWRITE_PANOSE_SYMBOL_ASPECT_RATIO = Enum("DWRITE_PANOSE_SYMBOL_ASPECT_RATIO", [ |
| 1130 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_ANY", |
| 1131 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NO_FIT", |
| 1132 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NO_WIDTH", |
| 1133 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_EXCEPTIONALLY_WIDE", |
| 1134 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_SUPER_WIDE", |
| 1135 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_VERY_WIDE", |
| 1136 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_WIDE", |
| 1137 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NORMAL", |
| 1138 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_NARROW", |
| 1139 | "DWRITE_PANOSE_SYMBOL_ASPECT_RATIO_VERY_NARROW", |
| 1140 | ]) |
| 1141 | |
| 1142 | DWRITE_OUTLINE_THRESHOLD = Enum("DWRITE_OUTLINE_THRESHOLD", [ |
| 1143 | "DWRITE_OUTLINE_THRESHOLD_ANTIALIASED", |
| 1144 | "DWRITE_OUTLINE_THRESHOLD_ALIASED", |
| 1145 | ]) |
| 1146 | |
| 1147 | DWRITE_BASELINE = Enum("DWRITE_BASELINE", [ |
| 1148 | "DWRITE_BASELINE_DEFAULT", |
| 1149 | "DWRITE_BASELINE_ROMAN", |
| 1150 | "DWRITE_BASELINE_CENTRAL", |
| 1151 | "DWRITE_BASELINE_MATH", |
| 1152 | "DWRITE_BASELINE_HANGING", |
| 1153 | "DWRITE_BASELINE_IDEOGRAPHIC_BOTTOM", |
| 1154 | "DWRITE_BASELINE_IDEOGRAPHIC_TOP", |
| 1155 | "DWRITE_BASELINE_MINIMUM", |
| 1156 | "DWRITE_BASELINE_MAXIMUM", |
| 1157 | ]) |
| 1158 | |
| 1159 | DWRITE_VERTICAL_GLYPH_ORIENTATION = Enum("DWRITE_VERTICAL_GLYPH_ORIENTATION", [ |
| 1160 | "DWRITE_VERTICAL_GLYPH_ORIENTATION_DEFAULT", |
| 1161 | "DWRITE_VERTICAL_GLYPH_ORIENTATION_STACKED", |
| 1162 | ]) |
| 1163 | |
| 1164 | DWRITE_GLYPH_ORIENTATION_ANGLE = Enum("DWRITE_GLYPH_ORIENTATION_ANGLE", [ |
| 1165 | "DWRITE_GLYPH_ORIENTATION_ANGLE_0_DEGREES", |
| 1166 | "DWRITE_GLYPH_ORIENTATION_ANGLE_90_DEGREES", |
| 1167 | "DWRITE_GLYPH_ORIENTATION_ANGLE_180_DEGREES", |
| 1168 | "DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES", |
| 1169 | ]) |
| 1170 | |
| 1171 | DWRITE_FONT_METRICS1 = Struct("DWRITE_FONT_METRICS1", [ |
| 1172 | (INT16, "glyphBoxLeft"), |
| 1173 | (INT16, "glyphBoxTop"), |
| 1174 | (INT16, "glyphBoxRight"), |
| 1175 | (INT16, "glyphBoxBottom"), |
| 1176 | (INT16, "subscriptPositionX"), |
| 1177 | (INT16, "subscriptPositionY"), |
| 1178 | (INT16, "subscriptSizeX"), |
| 1179 | (INT16, "subscriptSizeY"), |
| 1180 | (INT16, "superscriptPositionX"), |
| 1181 | (INT16, "superscriptPositionY"), |
| 1182 | (INT16, "superscriptSizeX"), |
| 1183 | (INT16, "superscriptSizeY"), |
| 1184 | (BOOL, "hasTypographicMetrics"), |
| 1185 | ]) |
| 1186 | |
| 1187 | DWRITE_CARET_METRICS = Struct("DWRITE_CARET_METRICS", [ |
| 1188 | (INT16, "slopeRise"), |
| 1189 | (INT16, "slopeRun"), |
| 1190 | (INT16, "offset"), |
| 1191 | ]) |
| 1192 | |
| 1193 | DWRITE_UNICODE_RANGE = Struct("DWRITE_UNICODE_RANGE", [ |
| 1194 | (UINT32, "first"), |
| 1195 | (UINT32, "last"), |
| 1196 | ]) |
| 1197 | |
| 1198 | DWRITE_SCRIPT_PROPERTIES = Struct("DWRITE_SCRIPT_PROPERTIES", [ |
| 1199 | (UINT32, "isoScriptCode"), |
| 1200 | (UINT32, "isoScriptNumber"), |
| 1201 | (UINT32, "clusterLookahead"), |
| 1202 | (UINT32, "justificationCharacter"), |
| 1203 | (UINT32, "restrictCaretToClusters"), |
| 1204 | (UINT32, "usesWordDividers"), |
| 1205 | (UINT32, "isDiscreteWriting"), |
| 1206 | (UINT32, "isBlockWriting"), |
| 1207 | (UINT32, "isDistributedWithinCluster"), |
| 1208 | (UINT32, "isConnectedWriting"), |
| 1209 | (UINT32, "isCursiveWriting"), |
| 1210 | (UINT32, "reserved"), |
| 1211 | ]) |
| 1212 | |
| 1213 | DWRITE_JUSTIFICATION_OPPORTUNITY = Struct("DWRITE_JUSTIFICATION_OPPORTUNITY", [ |
| 1214 | (FLOAT, "expansionMinimum"), |
| 1215 | (FLOAT, "expansionMaximum"), |
| 1216 | (FLOAT, "compressionMaximum"), |
| 1217 | (UINT32, "expansionPriority"), |
| 1218 | (UINT32, "compressionPriority"), |
| 1219 | (UINT32, "allowResidualExpansion"), |
| 1220 | (UINT32, "allowResidualCompression"), |
| 1221 | (UINT32, "applyToLeadingEdge"), |
| 1222 | (UINT32, "applyToTrailingEdge"), |
| 1223 | (UINT32, "reserved"), |
| 1224 | ]) |
| 1225 | |
| 1226 | IDWriteFactory1 = Interface("IDWriteFactory1", IDWriteFactory) |
| 1227 | IDWriteFontFace1 = Interface("IDWriteFontFace1", IDWriteFontFace) |
| 1228 | IDWriteFont1 = Interface("IDWriteFont1", IDWriteFont) |
| 1229 | IDWriteRenderingParams1 = Interface("IDWriteRenderingParams1", IDWriteRenderingParams) |
| 1230 | IDWriteTextAnalyzer1 = Interface("IDWriteTextAnalyzer1", IDWriteTextAnalyzer) |
| 1231 | IDWriteTextAnalysisSource1 = Interface("IDWriteTextAnalysisSource1", IDWriteTextAnalysisSource) |
| 1232 | IDWriteTextAnalysisSink1 = Interface("IDWriteTextAnalysisSink1", IDWriteTextAnalysisSink) |
| 1233 | IDWriteTextLayout1 = Interface("IDWriteTextLayout1", IDWriteTextLayout) |
| 1234 | IDWriteBitmapRenderTarget1 = Interface("IDWriteBitmapRenderTarget1", IDWriteBitmapRenderTarget) |
| 1235 | |
| 1236 | IDWriteFactory1.methods += [ |
Robert Tarasov | 6ccf5bb | 2020-01-10 12:31:25 -0800 | [diff] [blame] | 1237 | StdMethod(HRESULT, "GetEudcFontCollection", [Out(Pointer(ObjPointer(IDWriteFontCollection)), "fontCollection"), (BOOL, "checkForUpdates")]), |
Jose Fonseca | f7a7130 | 2015-08-13 16:10:06 +0100 | [diff] [blame] | 1238 | StdMethod(HRESULT, "CreateCustomRenderingParams", [(FLOAT, "gamma"), (FLOAT, "enhancedContrast"), (FLOAT, "enhancedContrastGrayscale"), (FLOAT, "clearTypeLevel"), (DWRITE_PIXEL_GEOMETRY, "pixelGeometry"), (DWRITE_RENDERING_MODE, "renderingMode"), Out(Pointer(ObjPointer(IDWriteRenderingParams1)), "renderingParams")]), |
| 1239 | ] |
| 1240 | |
| 1241 | IDWriteFontFace1.methods += [ |
| 1242 | StdMethod(Void, "GetMetrics", [Out(Pointer(DWRITE_FONT_METRICS1), "fontMetrics")]), |
| 1243 | StdMethod(HRESULT, "GetGdiCompatibleMetrics", [(FLOAT, "emSize"), (FLOAT, "pixelsPerDip"), (Pointer(Const(DWRITE_MATRIX)), "transform"), Out(Pointer(DWRITE_FONT_METRICS1), "fontMetrics")]), |
| 1244 | StdMethod(Void, "GetCaretMetrics", [Out(Pointer(DWRITE_CARET_METRICS), "caretMetrics")]), |
| 1245 | StdMethod(HRESULT, "GetUnicodeRanges", [(UINT32, "maxRangeCount"), Out(Pointer(DWRITE_UNICODE_RANGE), "unicodeRanges"), Out(Pointer(UINT32), "actualRangeCount")]), |
| 1246 | StdMethod(BOOL, "IsMonospacedFont", []), |
| 1247 | StdMethod(HRESULT, "GetDesignGlyphAdvances", [(UINT32, "glyphCount"), (Pointer(Const(UINT16)), "glyphIndices"), Out(ObjPointer(INT32), "glyphAdvances"), (BOOL, "isSideways")]), |
| 1248 | StdMethod(HRESULT, "GetGdiCompatibleGlyphAdvances", [(FLOAT, "emSize"), (FLOAT, "pixelsPerDip"), (Pointer(Const(DWRITE_MATRIX)), "transform"), (BOOL, "useGdiNatural"), (BOOL, "isSideways"), (UINT32, "glyphCount"), (Pointer(Const(UINT16)), "glyphIndices"), Out(ObjPointer(INT32), "glyphAdvances")]), |
| 1249 | StdMethod(HRESULT, "GetKerningPairAdjustments", [(UINT32, "glyphCount"), (Pointer(Const(UINT16)), "glyphIndices"), Out(ObjPointer(INT32), "glyphAdvanceAdjustments")]), |
| 1250 | StdMethod(BOOL, "HasKerningPairs", []), |
| 1251 | StdMethod(HRESULT, "GetRecommendedRenderingMode", [(FLOAT, "fontEmSize"), (FLOAT, "dpiX"), (FLOAT, "dpiY"), (Pointer(Const(DWRITE_MATRIX)), "transform"), (BOOL, "isSideways"), (DWRITE_OUTLINE_THRESHOLD, "outlineThreshold"), (DWRITE_MEASURING_MODE, "measuringMode"), Out(Pointer(DWRITE_RENDERING_MODE), "renderingMode")]), |
| 1252 | StdMethod(HRESULT, "GetVerticalGlyphVariants", [(UINT32, "glyphCount"), (Pointer(Const(UINT16)), "nominalGlyphIndices"), Out(Pointer(UINT16), "verticalGlyphIndices")]), |
| 1253 | StdMethod(BOOL, "HasVerticalGlyphVariants", []), |
| 1254 | ] |
| 1255 | |
| 1256 | |
| 1257 | DWRITE_PANOSE_TEXT = Struct("DWRITE_PANOSE_TEXT", [ |
| 1258 | (UINT8, "familyKind"), |
| 1259 | (UINT8, "serifStyle"), |
| 1260 | (UINT8, "weight"), |
| 1261 | (UINT8, "proportion"), |
| 1262 | (UINT8, "contrast"), |
| 1263 | (UINT8, "strokeVariation"), |
| 1264 | (UINT8, "armStyle"), |
| 1265 | (UINT8, "letterform"), |
| 1266 | (UINT8, "midline"), |
| 1267 | (UINT8, "xHeight"), |
| 1268 | ]) |
| 1269 | |
| 1270 | DWRITE_PANOSE_SCRIPT = Struct("DWRITE_PANOSE_SCRIPT", [ |
| 1271 | (UINT8, "familyKind"), |
| 1272 | (UINT8, "toolKind"), |
| 1273 | (UINT8, "weight"), |
| 1274 | (UINT8, "spacing"), |
| 1275 | (UINT8, "aspectRatio"), |
| 1276 | (UINT8, "contrast"), |
| 1277 | (UINT8, "scriptTopology"), |
| 1278 | (UINT8, "scriptForm"), |
| 1279 | (UINT8, "finials"), |
| 1280 | (UINT8, "xAscent"), |
| 1281 | ]) |
| 1282 | |
| 1283 | DWRITE_PANOSE_DECORATIVE = Struct("DWRITE_PANOSE_DECORATIVE", [ |
| 1284 | (UINT8, "familyKind"), |
| 1285 | (UINT8, "decorativeClass"), |
| 1286 | (UINT8, "weight"), |
| 1287 | (UINT8, "aspect"), |
| 1288 | (UINT8, "contrast"), |
| 1289 | (UINT8, "serifVariant"), |
| 1290 | (UINT8, "fill"), |
| 1291 | (UINT8, "lining"), |
| 1292 | (UINT8, "decorativeTopology"), |
| 1293 | (UINT8, "characterRange"), |
| 1294 | ]) |
| 1295 | |
| 1296 | DWRITE_PANOSE_SYMBOL = Struct("DWRITE_PANOSE_SYMBOL", [ |
| 1297 | (UINT8, "familyKind"), |
| 1298 | (UINT8, "symbolKind"), |
| 1299 | (UINT8, "weight"), |
| 1300 | (UINT8, "spacing"), |
| 1301 | (UINT8, "aspectRatioAndContrast"), |
| 1302 | (UINT8, "aspectRatio94"), |
| 1303 | (UINT8, "aspectRatio119"), |
| 1304 | (UINT8, "aspectRatio157"), |
| 1305 | (UINT8, "aspectRatio163"), |
| 1306 | (UINT8, "aspectRatio211"), |
| 1307 | ]) |
| 1308 | |
| 1309 | DWRITE_PANOSE = Struct("DWRITE_PANOSE", [ |
| 1310 | (UINT8, "familyKind"), |
| 1311 | # FIXME |
| 1312 | ]) |
| 1313 | |
| 1314 | |
| 1315 | IDWriteFont1.methods += [ |
| 1316 | StdMethod(Void, "GetMetrics", [Out(Pointer(DWRITE_FONT_METRICS1), "fontMetrics")]), |
| 1317 | StdMethod(Void, "GetPanose", [Out(OpaquePointer(DWRITE_PANOSE), "panose")]), |
| 1318 | StdMethod(HRESULT, "GetUnicodeRanges", [(UINT32, "maxRangeCount"), Out(Pointer(DWRITE_UNICODE_RANGE), "unicodeRanges"), Out(Pointer(UINT32), "actualRangeCount")]), |
| 1319 | StdMethod(BOOL, "IsMonospacedFont", []), |
| 1320 | ] |
| 1321 | |
| 1322 | IDWriteRenderingParams1.methods += [ |
| 1323 | StdMethod(FLOAT, "GetGrayscaleEnhancedContrast", []), |
| 1324 | ] |
| 1325 | |
| 1326 | IDWriteTextAnalyzer1.methods += [ |
| 1327 | StdMethod(HRESULT, "ApplyCharacterSpacing", [(FLOAT, "leadingSpacing"), (FLOAT, "trailingSpacing"), (FLOAT, "minimumAdvanceWidth"), (UINT32, "textLength"), (UINT32, "glyphCount"), (Pointer(Const(UINT16)), "clusterMap"), (Pointer(Const(FLOAT)), "glyphAdvances"), (Pointer(Const(DWRITE_GLYPH_OFFSET)), "glyphOffsets"), (Pointer(Const(DWRITE_SHAPING_GLYPH_PROPERTIES)), "glyphProperties"), Out(Pointer(FLOAT), "modifiedGlyphAdvances"), Out(Pointer(DWRITE_GLYPH_OFFSET), "modifiedGlyphOffsets")]), |
| 1328 | StdMethod(HRESULT, "GetBaseline", [(ObjPointer(IDWriteFontFace), "fontFace"), (DWRITE_BASELINE, "baseline"), (BOOL, "isVertical"), (BOOL, "isSimulationAllowed"), (DWRITE_SCRIPT_ANALYSIS, "scriptAnalysis"), (PCWSTR, "localeName"), Out(ObjPointer(INT32), "baselineCoordinate"), Out(Pointer(BOOL), "exists")]), |
| 1329 | StdMethod(HRESULT, "AnalyzeVerticalGlyphOrientation", [(ObjPointer(IDWriteTextAnalysisSource1), "analysisSource"), (UINT32, "textPosition"), (UINT32, "textLength"), (ObjPointer(IDWriteTextAnalysisSink1), "analysisSink")]), |
| 1330 | StdMethod(HRESULT, "GetGlyphOrientationTransform", [(DWRITE_GLYPH_ORIENTATION_ANGLE, "glyphOrientationAngle"), (BOOL, "isSideways"), Out(Pointer(DWRITE_MATRIX), "transform")]), |
| 1331 | StdMethod(HRESULT, "GetScriptProperties", [(DWRITE_SCRIPT_ANALYSIS, "scriptAnalysis"), Out(Pointer(DWRITE_SCRIPT_PROPERTIES), "scriptProperties")]), |
| 1332 | StdMethod(HRESULT, "GetTextComplexity", [(String(Const(WCHAR), "textLength", wide=True), "textString"), (UINT32, "textLength"), (ObjPointer(IDWriteFontFace), "fontFace"), Out(Pointer(BOOL), "isTextSimple"), Out(Pointer(UINT32), "textLengthRead"), Out(Pointer(UINT16), "glyphIndices")]), |
| 1333 | StdMethod(HRESULT, "GetJustificationOpportunities", [(ObjPointer(IDWriteFontFace), "fontFace"), (FLOAT, "fontEmSize"), (DWRITE_SCRIPT_ANALYSIS, "scriptAnalysis"), (UINT32, "textLength"), (UINT32, "glyphCount"), (String(Const(WCHAR), "textLength", wide=True), "textString"), (Pointer(Const(UINT16)), "clusterMap"), (Pointer(Const(DWRITE_SHAPING_GLYPH_PROPERTIES)), "glyphProperties"), Out(Pointer(DWRITE_JUSTIFICATION_OPPORTUNITY), "justificationOpportunities")]), |
| 1334 | StdMethod(HRESULT, "JustifyGlyphAdvances", [(FLOAT, "lineWidth"), (UINT32, "glyphCount"), (Pointer(Const(DWRITE_JUSTIFICATION_OPPORTUNITY)), "justificationOpportunities"), (Pointer(Const(FLOAT)), "glyphAdvances"), (Pointer(Const(DWRITE_GLYPH_OFFSET)), "glyphOffsets"), Out(Pointer(FLOAT), "justifiedGlyphAdvances"), Out(Pointer(DWRITE_GLYPH_OFFSET), "justifiedGlyphOffsets")]), |
| 1335 | StdMethod(HRESULT, "GetJustifiedGlyphs", [(ObjPointer(IDWriteFontFace), "fontFace"), (FLOAT, "fontEmSize"), (DWRITE_SCRIPT_ANALYSIS, "scriptAnalysis"), (UINT32, "textLength"), (UINT32, "glyphCount"), (UINT32, "maxGlyphCount"), (Pointer(Const(UINT16)), "clusterMap"), (Pointer(Const(UINT16)), "glyphIndices"), (Pointer(Const(FLOAT)), "glyphAdvances"), (Pointer(Const(FLOAT)), "justifiedGlyphAdvances"), (Pointer(Const(DWRITE_GLYPH_OFFSET)), "justifiedGlyphOffsets"), (Pointer(Const(DWRITE_SHAPING_GLYPH_PROPERTIES)), "glyphProperties"), Out(Pointer(UINT32), "actualGlyphCount"), Out(Pointer(UINT16), "modifiedClusterMap"), Out(Pointer(UINT16), "modifiedGlyphIndices"), Out(Pointer(FLOAT), "modifiedGlyphAdvances"), Out(Pointer(DWRITE_GLYPH_OFFSET), "modifiedGlyphOffsets")]), |
| 1336 | ] |
| 1337 | |
| 1338 | IDWriteTextAnalysisSource1.methods += [ |
| 1339 | StdMethod(HRESULT, "GetVerticalGlyphOrientation", [(UINT32, "textPosition"), Out(Pointer(UINT32), "textLength"), Out(Pointer(DWRITE_VERTICAL_GLYPH_ORIENTATION), "glyphOrientation"), Out(Pointer(UINT8), "bidiLevel")]), |
| 1340 | ] |
| 1341 | |
| 1342 | IDWriteTextAnalysisSink1.methods += [ |
| 1343 | StdMethod(HRESULT, "SetGlyphOrientation", [(UINT32, "textPosition"), (UINT32, "textLength"), (DWRITE_GLYPH_ORIENTATION_ANGLE, "glyphOrientationAngle"), (UINT8, "adjustedBidiLevel"), (BOOL, "isSideways"), (BOOL, "isRightToLeft")]), |
| 1344 | ] |
| 1345 | |
| 1346 | IDWriteTextLayout1.methods += [ |
| 1347 | StdMethod(HRESULT, "SetPairKerning", [(BOOL, "isPairKerningEnabled"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 1348 | StdMethod(HRESULT, "GetPairKerning", [(UINT32, "currentPosition"), Out(Pointer(BOOL), "isPairKerningEnabled"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 1349 | StdMethod(HRESULT, "SetCharacterSpacing", [(FLOAT, "leadingSpacing"), (FLOAT, "trailingSpacing"), (FLOAT, "minimumAdvanceWidth"), (DWRITE_TEXT_RANGE, "textRange")]), |
| 1350 | StdMethod(HRESULT, "GetCharacterSpacing", [(UINT32, "currentPosition"), Out(Pointer(FLOAT), "leadingSpacing"), Out(Pointer(FLOAT), "trailingSpacing"), Out(Pointer(FLOAT), "minimumAdvanceWidth"), Out(Pointer(DWRITE_TEXT_RANGE), "textRange")]), |
| 1351 | ] |
| 1352 | |
| 1353 | DWRITE_TEXT_ANTIALIAS_MODE = Enum("DWRITE_TEXT_ANTIALIAS_MODE", [ |
| 1354 | "DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE", |
| 1355 | "DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE", |
| 1356 | ]) |
| 1357 | |
| 1358 | IDWriteBitmapRenderTarget1.methods += [ |
| 1359 | StdMethod(DWRITE_TEXT_ANTIALIAS_MODE, "GetTextAntialiasMode", []), |
| 1360 | StdMethod(HRESULT, "SetTextAntialiasMode", [(DWRITE_TEXT_ANTIALIAS_MODE, "antialiasMode")]), |
| 1361 | ] |
| 1362 | |
| 1363 | dwrite.addInterfaces([ |
| 1364 | IDWriteFactory1 |
| 1365 | ]) |