#include-once ;############################################################################################################ ;# DirectWrite Error Codes ;############################################################################################################ Global Const $DWRITEERR_NOHWND = 0x80070006 ;Handle that is not valid Global Const $DWRITEERR_NOPTR = 0x80004003 ;Pointer that is not valid Global Const $DWRITEERR_NOOBJ = 0x800710D8 ;The object identifier does not represent a valid object Global Const $DWRITEERR_PARAM = 0x80070057 ;One or more arguments are not valid Global Const $DWRITEERR_UFAIL = 0x8000FFFF ;Unexpected failure Global Const $DWRITEERR_OBJFAIL = 0x80080001 ;Attempt to create a class object failed. Global Const $DWRITEERR_OK = 0x0 Global Const $DWRITE_E_FILEFORMAT = 0x88985000 ;Indicates an error in an input file such as a font file. Global Const $DWRITE_E_UNEXPECTED = 0x88985001 ;Indicates an error originating in DirectWrite code, which is not expected to occur but is safe to recover from. Global Const $DWRITE_E_NOFONT = 0x88985002 ;Indicates the specified font does not exist. Global Const $DWRITE_E_FILENOTFOUND = 0x88985003 ;A font file could not be opened because the file, directory, network location, drive, or other storage location does not exist or is unavailable. Global Const $DWRITE_E_FILEACCESS = 0x88985004 ;A font file exists but could not be opened due to access denied, sharing violation, or similar error. Global Const $DWRITE_E_FONTCOLLECTIONOBSOLETE = 0x88985005 ;A font collection is obsolete due to changes in the system. Global Const $DWRITE_E_ALREADYREGISTERED = 0x88985006 ;The given interface is already registered. Global Const $DWRITE_E_CACHEFORMAT = 0x88985007 ;The font cache contains invalid data. Global Const $DWRITE_E_CACHEVERSION = 0x88985008 ;A font cache file corresponds to a different version of DirectWrite. Global Const $DWRITE_E_UNSUPPORTEDOPERATION = 0x88985009 ;The operation is not supported for this type of font. ;############################################################################################################ ;# DWrite_Enumerations ;############################################################################################################ ;# DWRITE_INFORMATIONAL_STRING_ID Global Const $DWRITE_INFORMATIONAL_STRING_NONE = 0 Global Const $DWRITE_INFORMATIONAL_STRING_COPYRIGHT_NOTICE = 1 Global Const $DWRITE_INFORMATIONAL_STRING_VERSION_STRINGS = 2 Global Const $DWRITE_INFORMATIONAL_STRING_TRADEMARK = 3 Global Const $DWRITE_INFORMATIONAL_STRING_MANUFACTURER = 4 Global Const $DWRITE_INFORMATIONAL_STRING_DESIGNER = 5 Global Const $DWRITE_INFORMATIONAL_STRING_DESIGNER_URL = 6 Global Const $DWRITE_INFORMATIONAL_STRING_DESCRIPTION = 7 Global Const $DWRITE_INFORMATIONAL_STRING_FONT_VENDOR_URL = 8 Global Const $DWRITE_INFORMATIONAL_STRING_LICENSE_DESCRIPTION = 9 Global Const $DWRITE_INFORMATIONAL_STRING_LICENSE_INFO_URL = 10 Global Const $DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES = 11 Global Const $DWRITE_INFORMATIONAL_STRING_WIN32_SUBFAMILY_NAMES = 12 Global Const $DWRITE_INFORMATIONAL_STRING_PREFERRED_FAMILY_NAMES = 13 Global Const $DWRITE_INFORMATIONAL_STRING_PREFERRED_SUBFAMILY_NAMES = 14 Global Const $DWRITE_INFORMATIONAL_STRING_SAMPLE_TEXT = 15 ;# DWRITE_BREAK_CONDITION Global Const $DWRITE_BREAK_CONDITION_NEUTRAL = 0 Global Const $DWRITE_BREAK_CONDITION_CAN_BREAK = 1 Global Const $DWRITE_BREAK_CONDITION_MAY_NOT_BREAK = 2 Global Const $DWRITE_BREAK_CONDITION_MUST_BREAK = 3 ;# DWRITE_FACTORY_TYPE Global Const $DWRITE_FACTORY_TYPE_SHARED = 0 Global Const $DWRITE_FACTORY_TYPE_ISOLATED = 1 ;# DWRITE_FLOW_DIRECTION Global Const $DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM = 0 ;# DWRITE_FONT_FACE_TYPE Global Const $DWRITE_FONT_FACE_TYPE_CFF = 0 Global Const $DWRITE_FONT_FACE_TYPE_TRUETYPE = 1 Global Const $DWRITE_FONT_FACE_TYPE_TRUETYPE_COLLECTION = 2 Global Const $DWRITE_FONT_FACE_TYPE_TYPE1 = 3 Global Const $DWRITE_FONT_FACE_TYPE_VECTOR = 4 Global Const $DWRITE_FONT_FACE_TYPE_BITMAP = 5 Global Const $DWRITE_FONT_FACE_TYPE_UNKNOWN = 6 ;# DWRITE_FONT_FEATURE_TAG Global Const $DWRITE_FONT_FEATURE_TAG_DEFAULT = 0x746c6664 Global Const $DWRITE_FONT_FEATURE_TAG_VERTICAL_WRITING = 0x74726576 Global Const $DWRITE_FONT_FEATURE_TAG_VERTICAL_ALTERNATES_AND_ROTATION = 0x32747276 Global Const $DWRITE_FONT_FEATURE_TAG_ALTERNATIVE_FRACTIONS = 0x63726661 Global Const $DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS_FROM_CAPITALS = 0x63703263 Global Const $DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS_FROM_CAPITALS = 0x63733263 Global Const $DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_ALTERNATES = 0x746C6163 Global Const $DWRITE_FONT_FEATURE_TAG_CASE_SENSITIVE_FORMS = 0x65736163 Global Const $DWRITE_FONT_FEATURE_TAG_GLYPH_COMPOSITION_DECOMPOSITION = 0x706D6363 Global Const $DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_LIGATURES = 0x67696C63 Global Const $DWRITE_FONT_FEATURE_TAG_CAPITAL_SPACING = 0x70737063 Global Const $DWRITE_FONT_FEATURE_TAG_CONTEXTUAL_SWASH = 0x68777363 Global Const $DWRITE_FONT_FEATURE_TAG_CURSIVE_POSITIONING = 0x73727563 Global Const $DWRITE_FONT_FEATURE_TAG_DISCRETIONARY_LIGATURES = 0x67696C64 Global Const $DWRITE_FONT_FEATURE_TAG_EXPERT_FORMS = 0x74707865 Global Const $DWRITE_FONT_FEATURE_TAG_FRACTIONS = 0x63617266 Global Const $DWRITE_FONT_FEATURE_TAG_FULL_WIDTH = 0x64697766 Global Const $DWRITE_FONT_FEATURE_TAG_HALF_FORMS = 0x666C6168 Global Const $DWRITE_FONT_FEATURE_TAG_HALANT_FORMS = 0x6E6C6168 Global Const $DWRITE_FONT_FEATURE_TAG_ALTERNATE_HALF_WIDTH = 0x746C6168 Global Const $DWRITE_FONT_FEATURE_TAG_HISTORICAL_FORMS = 0x74736968 Global Const $DWRITE_FONT_FEATURE_TAG_HORIZONTAL_KANA_ALTERNATES = 0x616E6B68 Global Const $DWRITE_FONT_FEATURE_TAG_HISTORICAL_LIGATURES = 0x67696C68 Global Const $DWRITE_FONT_FEATURE_TAG_HALF_WIDTH = 0x64697768 Global Const $DWRITE_FONT_FEATURE_TAG_HOJO_KANJI_FORMS = 0x6F6A6F68 Global Const $DWRITE_FONT_FEATURE_TAG_JIS04_FORMS = 0x3430706A Global Const $DWRITE_FONT_FEATURE_TAG_JIS78_FORMS = 0x3837706A Global Const $DWRITE_FONT_FEATURE_TAG_JIS83_FORMS = 0x3338706A Global Const $DWRITE_FONT_FEATURE_TAG_JIS90_FORMS = 0x3039706A Global Const $DWRITE_FONT_FEATURE_TAG_KERNING = 0x6E72656B Global Const $DWRITE_FONT_FEATURE_TAG_STANDARD_LIGATURES = 0x6167696C Global Const $DWRITE_FONT_FEATURE_TAG_LINING_FIGURES = 0x6D756E6C Global Const $DWRITE_FONT_FEATURE_TAG_LOCALIZED_FORMS = 0x6C636F6C Global Const $DWRITE_FONT_FEATURE_TAG_MARK_POSITIONING = 0x6B72616D Global Const $DWRITE_FONT_FEATURE_TAG_MATHEMATICAL_GREEK = 0x6B72676D Global Const $DWRITE_FONT_FEATURE_TAG_MARK_TO_MARK_POSITIONING = 0x6B6D6B6D Global Const $DWRITE_FONT_FEATURE_TAG_ALTERNATE_ANNOTATION_FORMS = 0x746C616E Global Const $DWRITE_FONT_FEATURE_TAG_NLC_KANJI_FORMS = 0x6B636C6E Global Const $DWRITE_FONT_FEATURE_TAG_OLD_STYLE_FIGURES = 0x6D756E6F Global Const $DWRITE_FONT_FEATURE_TAG_ORDINALS = 0x6E64726F Global Const $DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_ALTERNATE_WIDTH = 0x746C6170 Global Const $DWRITE_FONT_FEATURE_TAG_PETITE_CAPITALS = 0x70616370 Global Const $DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_FIGURES = 0x6D756E70 Global Const $DWRITE_FONT_FEATURE_TAG_PROPORTIONAL_WIDTHS = 0x64697770 Global Const $DWRITE_FONT_FEATURE_TAG_QUARTER_WIDTHS = 0x64697771 Global Const $DWRITE_FONT_FEATURE_TAG_REQUIRED_LIGATURES = 0x67696C72 Global Const $DWRITE_FONT_FEATURE_TAG_RUBY_NOTATION_FORMS = 0x79627572 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_ALTERNATES = 0x746C6173 Global Const $DWRITE_FONT_FEATURE_TAG_SCIENTIFIC_INFERIORS = 0x666E6973 Global Const $DWRITE_FONT_FEATURE_TAG_SMALL_CAPITALS = 0x70636D73 Global Const $DWRITE_FONT_FEATURE_TAG_SIMPLIFIED_FORMS = 0x6C706D73 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1 = 0x31307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_2 = 0x32307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_3 = 0x33307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_4 = 0x34307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_5 = 0x35307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_6 = 0x36307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_7 = 0x37307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_8 = 0x38307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_9 = 0x39307373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_10 = 0x30317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_11 = 0x31317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_12 = 0x32317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_13 = 0x33317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_14 = 0x34317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_15 = 0x35317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_16 = 0x36317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_17 = 0x37317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_18 = 0x38317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_19 = 0x39317373 Global Const $DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_20 = 0x30327373 Global Const $DWRITE_FONT_FEATURE_TAG_SUBSCRIPT = 0x73627573 Global Const $DWRITE_FONT_FEATURE_TAG_SUPERSCRIPT = 0x73707573 Global Const $DWRITE_FONT_FEATURE_TAG_SWASH = 0x68737773 Global Const $DWRITE_FONT_FEATURE_TAG_TITLING = 0x6C746974 Global Const $DWRITE_FONT_FEATURE_TAG_TRADITIONAL_NAME_FORMS = 0x6D616E74 Global Const $DWRITE_FONT_FEATURE_TAG_TABULAR_FIGURES = 0x6D756E74 Global Const $DWRITE_FONT_FEATURE_TAG_TRADITIONAL_FORMS = 0x64617274 Global Const $DWRITE_FONT_FEATURE_TAG_THIRD_WIDTHS = 0x64697774 Global Const $DWRITE_FONT_FEATURE_TAG_UNICASE = 0x63696E75 Global Const $DWRITE_FONT_FEATURE_TAG_SLASHED_ZERO = 0x6F72657A ;# DWRITE_FONT_FILE_TYPE Global Const $DWRITE_FONT_FILE_TYPE_UNKNOWN = 0 Global Const $DWRITE_FONT_FILE_TYPE_CFF = 1 Global Const $DWRITE_FONT_FILE_TYPE_TRUETYPE = 2 Global Const $DWRITE_FONT_FILE_TYPE_TRUETYPE_COLLECTION = 3 Global Const $DWRITE_FONT_FILE_TYPE_TYPE1_PFM = 4 Global Const $DWRITE_FONT_FILE_TYPE_TYPE1_PFB = 5 Global Const $DWRITE_FONT_FILE_TYPE_VECTOR = 6 Global Const $DWRITE_FONT_FILE_TYPE_BITMAP = 7 ;# DWRITE_FONT_SIMULATIONS Global Const $DWRITE_FONT_SIMULATIONS_NONE = 0x0000 Global Const $DWRITE_FONT_SIMULATIONS_BOLD = 0x0001 Global Const $DWRITE_FONT_SIMULATIONS_OBLIQUE = 0x0002 ;# DWRITE_FONT_STRETCH Global Const $DWRITE_FONT_STRETCH_UNDEFINED = 0 Global Const $DWRITE_FONT_STRETCH_ULTRA_CONDENSED = 1 Global Const $DWRITE_FONT_STRETCH_EXTRA_CONDENSED = 2 Global Const $DWRITE_FONT_STRETCH_CONDENSED = 3 Global Const $DWRITE_FONT_STRETCH_SEMI_CONDENSED = 4 Global Const $DWRITE_FONT_STRETCH_NORMAL = 5 Global Const $DWRITE_FONT_STRETCH_MEDIUM = 5 Global Const $DWRITE_FONT_STRETCH_SEMI_EXPANDED = 6 Global Const $DWRITE_FONT_STRETCH_EXPANDED = 7 Global Const $DWRITE_FONT_STRETCH_EXTRA_EXPANDED = 8 Global Const $DWRITE_FONT_STRETCH_ULTRA_EXPANDED = 9 ;# DWRITE_FONT_STYLE Global Const $DWRITE_FONT_STYLE_NORMAL = 0 Global Const $DWRITE_FONT_STYLE_OBLIQUE = 1 Global Const $DWRITE_FONT_STYLE_ITALIC = 2 ;# DWRITE_FONT_WEIGHT Global Const $DWRITE_FONT_WEIGHT_THIN = 100 Global Const $DWRITE_FONT_WEIGHT_EXTRA_LIGHT = 200 Global Const $DWRITE_FONT_WEIGHT_ULTRA_LIGHT = 200 Global Const $DWRITE_FONT_WEIGHT_LIGHT = 300 Global Const $DWRITE_FONT_WEIGHT_NORMAL = 400 Global Const $DWRITE_FONT_WEIGHT_REGULAR = 400 Global Const $DWRITE_FONT_WEIGHT_MEDIUM = 500 Global Const $DWRITE_FONT_WEIGHT_DEMI_BOLD = 600 Global Const $DWRITE_FONT_WEIGHT_SEMI_BOLD = 600 Global Const $DWRITE_FONT_WEIGHT_BOLD = 700 Global Const $DWRITE_FONT_WEIGHT_EXTRA_BOLD = 800 Global Const $DWRITE_FONT_WEIGHT_ULTRA_BOLD = 800 Global Const $DWRITE_FONT_WEIGHT_BLACK = 900 Global Const $DWRITE_FONT_WEIGHT_HEAVY = 900 Global Const $DWRITE_FONT_WEIGHT_EXTRA_BLACK = 950 Global Const $DWRITE_FONT_WEIGHT_ULTRA_BLACK = 950 ;# DWRITE_LINE_SPACING_METHOD Global Const $DWRITE_LINE_SPACING_METHOD_DEFAULT = 0 Global Const $DWRITE_LINE_SPACING_METHOD_UNIFORM = 1 ;# DWRITE_MEASURING_MODE Global Const $DWRITE_MEASURING_MODE_NATURAL = 0 Global Const $DWRITE_MEASURING_MODE_GDI_CLASSIC = 1 Global Const $DWRITE_MEASURING_MODE_GDI_NATURAL = 2 ;# DWRITE_NUMBER_SUBSTITUTION_METHOD Global Const $DWRITE_NUMBER_SUBSTITUTION_METHOD_FROM_CULTURE = 0 Global Const $DWRITE_NUMBER_SUBSTITUTION_METHOD_CONTEXTUAL = 1 Global Const $DWRITE_NUMBER_SUBSTITUTION_METHOD_NONE = 2 Global Const $DWRITE_NUMBER_SUBSTITUTION_METHOD_NATIONAL = 3 Global Const $DWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL = 4 ;# DWRITE_PARAGRAPH_ALIGNMENT Global Const $DWRITE_PARAGRAPH_ALIGNMENT_NEAR = 0 Global Const $DWRITE_PARAGRAPH_ALIGNMENT_FAR = 1 Global Const $DWRITE_PARAGRAPH_ALIGNMENT_CENTER = 2 ;# DWRITE_PIXEL_GEOMETRY Global Const $DWRITE_PIXEL_GEOMETRY_FLAT = 0 Global Const $DWRITE_PIXEL_GEOMETRY_RGB = 1 Global Const $DWRITE_PIXEL_GEOMETRY_BGR = 2 ;# DWRITE_READING_DIRECTION Global Const $DWRITE_READING_DIRECTION_LEFT_TO_RIGHT = 0 Global Const $DWRITE_READING_DIRECTION_RIGHT_TO_LEFT = 1 ;# DWRITE_RENDERING_MODE Global Const $DWRITE_RENDERING_MODE_DEFAULT = 0 Global Const $DWRITE_RENDERING_MODE_ALIASED = 1 Global Const $DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC = 2 Global Const $DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL = 3 Global Const $DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL = 4 Global Const $DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL_SYMMETRIC = 5 Global Const $DWRITE_RENDERING_MODE_OUTLINE = 6 ;# DWRITE_SCRIPT_SHAPES Global Const $DWRITE_SCRIPT_SHAPES_DEFAULT = 0 Global Const $DWRITE_SCRIPT_SHAPES_NO_VISUAL = 1 ;# DWRITE_TEXT_ALIGNMENT Global Const $DWRITE_TEXT_ALIGNMENT_LEADING = 0 Global Const $DWRITE_TEXT_ALIGNMENT_TRAILING = 1 Global Const $DWRITE_TEXT_ALIGNMENT_CENTER = 2 ;# DWRITE_TEXTURE_TYPE Global Const $DWRITE_TEXTURE_ALIASED_1x1 = 0 Global Const $DWRITE_TEXTURE_CLEARTYPE_3x1 = 1 ;# DWRITE_TRIMMING_GRANULARITY Global Const $DWRITE_TRIMMING_GRANULARITY_NONE = 0 Global Const $DWRITE_TRIMMING_GRANULARITY_CHARACTER = 1 Global Const $DWRITE_TRIMMING_GRANULARITY_WORD = 2 ;# DWRITE_WORD_WRAPPING Global Const $DWRITE_WORD_WRAPPING_WRAP = 0 Global Const $DWRITE_WORD_WRAPPING_NO_WRAP = 1 ;############################################################################################################ ;# DWrite_STRUCTURES ;############################################################################################################ Global Const $tagDWRITE_OVERHANG_METRICS = "struct; float Left; float Top; float Right; float Bottom; endstruct;" ;Global Const $tagDWRITE_CLUSTER_METRICS = "struct; float Width; ushort Length; ushort CanWrapLineAfter:1; ushort IsWhitespace:1; ushort IsNewline:1; ushort IsSoftHyphen:1; ushort IsRightToLeft:1; ushort Padding:11; endstruct;" Global Const $tagDWRITE_CLUSTER_METRICS = "struct; float Width; ushort Length; ushort Values; endstruct;" Global Const $tagDWRITE_FONT_FEATURE = "struct; uint NameTag; uint Parameter; endstruct;" Global Const $tagDWRITE_FONT_METRICS = "struct; ushort DesignUnitsPerEm; ushort Ascent; ushort Descent; short LineGap; ushort CapHeight; ushort XHeight; short UnderlinePosition; ushort UnderlineThickness; short StrikethroughPosition; ushort StrikethroughThickness; endstruct;" Global Const $tagDWRITE_GLYPH_METRICS = "struct; int LeftSideBearing; uint AdvanceWidth; int RightSideBearing; int TopSideBearing; uint AdvanceHeight; int BottomSideBearing; int VerticalOriginY; endstruct;" Global Const $tagDWRITE_GLYPH_OFFSET = "struct; float AdvanceOffset; float AscenderOffset; endstruct;" Global Const $tagDWRITE_GLYPH_RUN = "struct; ptr FontFace; float FontEmSize; uint GlyphCount; ptr GlyphIndices; ptr GlyphAdvances; ptr GlyphOffsets; bool IsSideways; uint BidiLevel; endstruct;" ;Global Const $tagDWRITE_GLYPH_RUN_DESCRIPTION = "struct; wchar* LocaleName; wchar* String; uint StringLength; ushort* ClusterMap; uint TextPosition; endstruct;" Global Const $tagDWRITE_GLYPH_RUN_DESCRIPTION = "struct; ptr LocaleName; ptr String; uint StringLength; ptr ClusterMap; uint TextPosition; endstruct;" Global Const $tagDWRITE_HIT_TEST_METRICS = "struct; uint TextPosition; uint Length; float Left; float Top; float Width; float Height; uint BidiLevel; bool IsText; endstruct;" Global Const $tagDWRITE_INLINE_OBJECT_METRICS = "struct; float Width; float Height; float Baseline; bool SupportsSideways; endstruct;" ;Global Const $tagDWRITE_LINE_BREAKPOINT = "struct; ubyte BreakConditionBefore:2; ubyte BreakConditionAfter:2; ubyte IsWhitespace:1; ubyte IsSoftHyphen:1; ubyte Padding:2; endstruct;" Global Const $tagDWRITE_LINE_BREAKPOINT = "struct; ubyte Values; endstruct;" Global Const $tagDWRITE_LINE_METRICS = "struct; uint Length; uint TrailingWhitespaceLength; uint NewlineLength; float Height; float Baseline; bool IsTrimmed; endstruct;" Global Const $tagDWRITE_MATRIX = "struct; float M11; float M12; float M21; float M22; float DX; float DY; endstruct;" Global Const $tagDWRITE_SCRIPT_ANALYSIS = "struct; ushort Script; uint Shapes; endstruct;" ;Global Const $tagDWRITE_SHAPING_GLYPH_PROPERTIES = "struct; ushort Justification:4; ushort IsClusterStart:1; ushort IsDiacritic:1; ushort IsZeroWidthSpace:1; ushort Reserved:9; endstruct;" Global Const $tagDWRITE_SHAPING_GLYPH_PROPERTIES = "struct; ushort Values; endstruct;" ;Global Const $tagDWRITE_SHAPING_TEXT_PROPERTIES = "struct; ushort IsShapedAlone:1; ushort Reserved:15; endstruct;" Global Const $tagDWRITE_SHAPING_TEXT_PROPERTIES = "struct; ushort Values; endstruct;" ;Global Const $tagDWRITE_STRIKETHROUGH = "struct; float Width; float Thickness; float Offset; uint ReadingDirection; uint FlowDirection; wchar* LocaleName; uint MeasuringMode; endstruct;" Global Const $tagDWRITE_STRIKETHROUGH = "struct; float Width; float Thickness; float Offset; uint ReadingDirection; uint FlowDirection; ptr LocaleName; uint MeasuringMode; endstruct;" Global Const $tagDWRITE_TEXT_METRICS = "struct; float Left; float Top; float Width; float WidthIncludingTrailingWhitespace; float Height; float LayoutWidth; float LayoutHeight; uint MaxBidiReorderingDepth; endstruct;" Global Const $tagDWRITE_TEXT_RANGE = "struct; uint StartPosition; uint Length; endstruct;" Global Const $tagDWRITE_TRIMMING = "struct; uint Granularity; uint Delimiter; uint DelimiterCount; endstruct;" Global Const $tagDWRITE_TYPOGRAPHIC_FEATURES = "struct; ptr Features; uint FeatureCount; endstruct;" ;Global Const $tagDWRITE_UNDERLINE = "struct; float Width; float Thickness; float Offset; float RunHeight; uint ReadingDirection; uint FlowDirection; wchar* LocaleName; uint MeasuringMode; endstruct;" Global Const $tagDWRITE_UNDERLINE = "struct; float Width; float Thickness; float Offset; float RunHeight; uint ReadingDirection; uint FlowDirection; ptr LocaleName; uint MeasuringMode; endstruct;" ;############################################################################################################ ;# DWrite_GUID ;############################################################################################################ Global Const $sIID_IDWriteBitmapRenderTarget = "{5e5a32a3-8dff-4773-9ff6-0696eab77267}" Global Const $sIID_IDWriteFactory = "{b859ee5a-d838-4b5b-a2e8-1adc7d93db48}" Global Const $sIID_IDWriteFont = "{acd16696-8c14-4f5d-877e-fe3fc1d32737}" Global Const $sIID_IDWriteFontCollection = "{a84cee02-3eea-4eee-a827-87c1a02a0fcc}" Global Const $sIID_IDWriteFontCollectionLoader = "{cca920e4-52f0-492b-bfa8-29c72ee0a468}" Global Const $sIID_IDWriteFontFace = "{5f49804d-7024-4d43-bfa9-d25984f53849}" Global Const $sIID_IDWriteFontList = "{1a0d8438-1d97-4ec1-aef9-a2fb86ed6acb}" Global Const $sIID_IDWriteFontFamily = "{da20d8ef-812a-4c43-9802-62ec4abd7add}" Global Const $sIID_IDWriteFontFile = "{739d886a-cef5-47dc-8769-1a8b41bebbb0}" Global Const $sIID_IDWriteFontFileEnumerator = "{72755049-5ff7-435d-8348-4be97cfa6c7c}" Global Const $sIID_IDWriteFontFileLoader = "{727cad4e-d6af-4c9e-8a08-d695b11caa49}" Global Const $sIID_IDWriteFontFileStream = "{6d4865fe-0ab8-4d91-8f62-5dd6be34a3e0}" Global Const $sIID_IDWriteGdiInterop = "{1edd9491-9853-4299-898f-6432983b6f3a}" Global Const $sIID_IDWriteGlyphRunAnalysis = "{7d97dbf7-e085-42d4-81e3-6a883bded118}" Global Const $sIID_IDWriteInlineObject = "{8339FDE3-106F-47ab-8373-1C6295EB10B3}" Global Const $sIID_IDWriteLocalFontFileLoader = "{b2d9f3ec-c9fe-4a11-a2ec-d86208f7c0a2}" Global Const $sIID_IDWriteLocalizedStrings = "{08256209-099a-4b34-b86d-c22b110e7771}" Global Const $sIID_IDWritePixelSnapping = "{eaf3a2da-ecf4-4d24-b644-b34f6842024b}" Global Const $sIID_IDWriteRenderingParams = "{2f0da53a-2add-47cd-82ee-d9ec34688e75}" Global Const $sIID_IDWriteTextAnalyzer = "{b7e6163e-7f46-43b4-84b3-e4e6249c365d}" Global Const $sIID_IDWriteTextFormat = "{9c906818-31d7-4fd3-a151-7c5e225db55a}" Global Const $sIID_IDWriteTextLayout = "{53737037-6d14-410b-9bfe-0b182bb70961}" Global Const $sIID_IDWriteTextRenderer = "{ef8a8135-5cc6-45fe-8825-c5a0724eb819}" Global Const $sIID_IDWriteTypography = "{55f1112b-1dc2-4b3c-9541-f46894ed85b6}" ;############################################################################################################ ;# DWrite_InterfaceDescription ;############################################################################################################ Global Const $tagIDWriteBitmapRenderTarget = "DrawGlyphRun hresult(float;float;uint;struct*;struct*;uint;ptr*);" & _ "GetMemoryDC handle();" & _ "GetPixelsPerDip float();" & _ "SetPixelsPerDip hresult(float);" & _ "GetCurrentTransform hresult(ptr*);" & _ "SetCurrentTransform hresult(struct*);" & _ "GetSize hresult(ptr*);" & _ "Resize hresult(uint;uint);" Global Const $tagIDWriteFactory = "GetSystemFontCollection hresult(ptr*;bool);" & _ "CreateCustomFontCollection hresult(struct*;struct*;uint;ptr*);" & _ "RegisterFontCollectionLoader hresult(struct*);" & _ "UnregisterFontCollectionLoader hresult(struct*);" & _ "CreateFontFileReference hresult(wstr;struct*;ptr*);" & _ "CreateCustomFontFileReference hresult(struct*;uint;struct*;ptr*);" & _ "CreateFontFace hresult(uint;uint;struct*;uint;uint;ptr*);" & _ "CreateRenderingParams hresult(ptr*);" & _ "CreateMonitorRenderingParams hresult(handle;ptr*);" & _ "CreateCustomRenderingParams hresult(float;float;float;uint;uint;ptr*);" & _ "RegisterFontFileLoader hresult(struct*);" & _ "UnregisterFontFileLoader hresult(struct*);" & _ "CreateTextFormat hresult(wstr;struct*;uint;uint;uint;float;wstr;ptr*);" & _ "CreateTypography hresult(ptr*);" & _ "GetGdiInterop hresult(ptr*);" & _ "CreateTextLayout hresult(wstr;uint;struct*;float;float;ptr*);" & _ "CreateGdiCompatibleTextLayout hresult(wstr;uint;struct*;float;float;float;struct*;bool;ptr*);" & _ "CreateEllipsisTrimmingSign hresult(struct*;ptr*);" & _ "CreateTextAnalyzer hresult(ptr*);" & _ "CreateNumberSubstitution hresult(uint;wstr;bool;ptr*);" & _ "CreateGlyphRunAnalysis hresult(struct*;float;struct*;uint;uint;float;float;ptr*);" Global Const $tagIDWriteFont = "GetFontFamily hresult(ptr*);" & _ "GetWeight uint();" & _ "GetStretch uint();" & _ "GetStyle uint();" & _ "IsSymbolFont bool();" & _ "GetFaceNames hresult(ptr*);" & _ "GetInformationalStrings hresult(uint;struct*;bool*);" & _ "GetSimulations uint();" & _ "GetMetrics none(struct*);" & _ "HasCharacter hresult(uint;bool*);" & _ "CreateFontFace hresult(ptr*);" Global Const $tagIDWriteFontCollection = "GetFontFamilyCount uint();" & _ "GetFontFamily hresult(uint;ptr*);" & _ "FindFamilyName hresult(wstr;uint*;bool*);" & _ "GetFontFromFontFace hresult(struct*;ptr*);" Global Const $tagIDWriteFontCollectionLoader = "CreateEnumeratorFromKey hresult(struct*;struct*;uint;ptr*);" Global Const $tagIDWriteFontFace = "GetType uint();" & _ "GetFiles hresult(uint*;ptr*);" & _ "GetIndex uint();" & _ "GetSimulations uint();" & _ "IsSymbolFont bool();" & _ "GetMetrics none(ptr*);" & _ "GetGlyphCount word();" & _ "GetDesignGlyphMetrics hresult(struct*;uint;ptr*;bool);" & _ "GetGlyphIndices hresult(struct*;uint;struct*);" & _ "TryGetFontTable hresult(uint;struct*;uint*;ptr*;bool*);" & _ "ReleaseFontTable none(struct*);" & _ "GetGlyphRunOutline hresult(float;struct*;struct*;struct*;uint;bool;bool;struct*);" & _ "GetRecommendedRenderingMode hresult(float;float;uint;struct*;uint*);" & _ "GetGdiCompatibleMetrics hresult(float;float;struct*;struct*);" & _ "GetGdiCompatibleGlyphMetrics hresult(float;float;struct*;bool;struct*;uint;struct*;bool);" Global Const $tagIDWriteFontList = "GetFontCollection hresult(ptr*);" & _ "GetFontCount uint();" & _ "GetFont hresult(uint;ptr*);" Global Const $tagIDWriteFontFamily = $tagIDWriteFontList & _ "GetFamilyNames hresult(ptr*);" & _ "GetFirstMatchingFont hresult(uint;uint;uint;ptr*);" & _ "GetMatchingFonts hresult(uint;uint;uint;ptr*);" Global Const $tagIDWriteFontFile = "GetReferenceKey hresult(ptr*;uint*);" & _ "GetLoader hresult(ptr*);" & _ "Analyze hresult(bool*;uint*;uint*;uint*);" Global Const $tagIDWriteFontFileEnumerator = "MoveNext hresult(bool*);" & _ "GetCurrentFontFile hresult(ptr*);" Global Const $tagIDWriteFontFileLoader = "CreateStreamFromKey hresult(struct*;uint;ptr*);" Global Const $tagIDWriteFontFileStream = "ReadFileFragment hresult(ptr*;uint64;uint64;ptr*);" & _ "ReleaseFileFragment none(struct*);" & _ "GetFileSize hresult(uint64*);" & _ "GetLastWriteTime hresult(uint64*);" Global Const $tagIDWriteGdiInterop = "CreateFontFromLOGFONT hresult(struct*;ptr*);" & _ "ConvertFontToLOGFONT hresult(struct*;struct*;bool*;);" & _ "ConvertFontFaceToLOGFONT hresult(struct*;ptr*);" & _ "CreateFontFaceFromHdc hresult(handle;ptr*);" & _ "CreateBitmapRenderTarget hresult(handle;uint;uint;ptr*);" Global Const $tagIDWriteGlyphRunAnalysis = "GetAlphaTextureBounds hresult(uint;ptr*);" & _ "CreateAlphaTexture hresult(uint;struct*;struct*;uint);" & _ "GetAlphaBlendParams hresult(struct*;float*;float*;float*);" Global Const $tagIDWriteInlineObject = "Draw hresult(struct*;struct*;float;float;bool;bool;struct*);" & _ "GetMetrics hresult(struct*);" & _ "GetOverhangMetrics hresult(struct*);" & _ "GetBreakConditions hresult(uint*;uint*);" Global Const $tagIDWriteLocalFontFileLoader = $tagIDWriteFontFileLoader & _ "GetFilePathLengthFromKey hresult(struct*;uint;uint*);" & _ "GetFilePathFromKey hresult(struct*;uint;wstr;uint);" & _ "GetLastWriteTimeFromKey hresult(struct*;uint;struct*);" Global Const $tagIDWriteLocalizedStrings = "GetCount uint();" & _ "FindLocaleName hresult(wstr;uint*;bool*);" & _ "GetLocaleNameLength hresult(uint;uint*);" & _ "GetLocaleName hresult(uint;wstr;uint);" & _ "GetStringLength hresult(uint;uint*);" & _ "GetString hresult(uint;wstr;uint);" Global Const $tagIDWritePixelSnapping = "IsPixelSnappingEnabled hresult(struct*;bool*);" & _ "GetCurrentTransform hresult(ptr;ptr*);" & _;GetCurrentTransform hresult(struct*;struct*); "GetPixelsPerDip hresult(struct*;float*);" Global Const $tagIDWriteRenderingParams = "GetGamma float();" & _ "GetEnhancedContrast float();" & _ "GetClearTypeLevel float();" & _ "GetPixelGeometry uint();" & _ "GetRenderingMode uint();" Global Const $tagIDWriteTextAnalyzer = "AnalyzeScript hresult(struct*;uint;uint;struct*);" & _ "AnalyzeBidi hresult(struct*;uint;uint;struct*);" & _ "AnalyzeNumberSubstitution hresult(struct*;uint;uint;struct*);" & _ "AnalyzeLineBreakpoints hresult(struct*;uint;uint;struct*);" & _ "GetGlyphs hresult(wstr;uint;struct*;bool;bool;struct*;wstr;struct*;struct*;uint;uint;struct*;struct*;struct*;struct*;uint*);" & _ "GetGlyphPlacements hresult(wstr;struct*;struct*;uint;struct*;struct*;uint;struct*;float;bool;bool;struct*;wstr;struct*;struct*;uint;struct*;struct*);" & _ "GetGdiCompatibleGlyphPlacements hresult(wstr;struct*;struct*;uint;struct*;struct*;uint;struct*;float;float;struct*;bool;bool;bool;struct*;wstr;struct*;struct*;uint;struct*;struct*);" Global Const $tagIDWriteTextFormat = "SetTextAlignment hresult(uint);" & _ "SetParagraphAlignment hresult(uint);" & _ "SetWordWrapping hresult(uint);" & _ "SetReadingDirection hresult(uint);" & _ "SetFlowDirection hresult(uint);" & _ "SetIncrementalTabStop hresult(float);" & _ "SetTrimming hresult(struct*;ptr*);" & _ "SetLineSpacing hresult(uint;float;float);" & _ "GetTextAlignment uint();" & _ "GetParagraphAlignment uint();" & _ "GetWordWrapping uint();" & _ "GetReadingDirection uint();" & _ "GetFlowDirection uint();" & _ "GetIncrementalTabStop float();" & _ "GetTrimming hresult(struct*;ptr*);" & _ "GetLineSpacing hresult(uint*;float*float*);" & _ "GetFontCollection hresult(ptr*);" & _ "GetFontFamilyNameLength uint(wstr;uint);" & _ "GetFontFamilyName hresult();" & _ "GetFontWeight uint();" & _ "GetFontStyle uint();" & _ "GetFontStretch uint();" & _ "GetFontSize float();" & _ "GetLocaleNameLength uint();" & _ "GetLocaleName hresult(wstr;uint);" Global Const $tagIDWriteTextLayout = $tagIDWriteTextFormat & _ "SetMaxWidth hresult(float);" & _ "SetMaxHeight hresult(float);" & _ "SetFontCollection hresult(struct*;struct*);" & _ "SetFontFamilyName hresult(wstr;uint;uint);" & _ "SetFontWeight hresult(uint;uint;uint);" & _ "SetFontStyle hresult(uint;uint;uint);" & _ "SetFontStretch hresult(uint;uint;uint);" & _ "SetFontSize hresult(float;uint;uint);" & _ "SetUnderline hresult(bool;uint;uint);" & _ "SetStrikethrough hresult(bool;uint;uint);" & _ "SetDrawingEffect hresult(struct*;uint;uint);" & _ "SetInlineObject hresult(struct*;uint;uint);" & _ "SetTypography hresult(struct*;struct);" & _ "SetLocaleName hresult(wstr;uint;uint);" & _ "GetMaxWidth float();" & _ "GetMaxHeight float();" & _ "GetFontCollection hresult(uint;ptr*;uint*;uint*);" & _ "GetFontFamilyNameLength hresult(uint;uint*;uint*;uint*);" & _ "GetFontFamilyName hresult(uint;wstr;uint;uint*;uint*);" & _ "GetFontWeight hresult(uint;uint*;uint*;uint*);" & _ "GetFontStyle hresult(uint;uint*;uint*;uint*);" & _ "GetFontStretch hresult(uint;uint*;uint*;uint*);" & _ "GetFontSize hresult(uint;float*;uint*;uint*);" & _ "GetUnderline hresult(uint;bool*;uint*;uint*);" & _ "GetStrikethrough hresult(uint;bool*;uint*;uint*);" & _ "GetDrawingEffect hresult(uint;ptr*;uint*;uint*);" & _ "GetInlineObject hresult(uint;ptr*;uint*;uint*);" & _ "GetTypography hresult(uint;ptr*;uint*;uint*);" & _ "GetLocaleNameLength hresult(uint;uint*;uint*;uint*);" & _ "GetLocaleName hresult(uint;wstr;uint;uint*;uint*);" & _ "Draw hresult(ptr;struct*;float;float);" & _;Draw hresult(ptr;ptr;float;float); Draw hresult(struct*;struct*;float;float)-original "GetLineMetrics hresult(struct*;uint;uint*);" & _ "GetMetrics hresult(struct*);" & _ "GetOverhangMetrics hresult(struct*);" & _ "GetClusterMetrics hresult(ptr*;uint;uint*);" & _ "DetermineMinWidth hresult(float*);" & _ "HitTestPoint hresult(float;float;bool*;bool*;struct*);" & _ "HitTestTextPosition hresult(uint;bool;float*;float*;struct*);" & _ "HitTestTextRange hresult(uint;uint;float;float;struct*;uint;uint*);" Global Const $tagIDWriteTextRenderer = $tagIDWritePixelSnapping & _ "DrawGlyphRun hresult(ptr;float;float;uint;ptr;ptr;struct*);" & _;DrawGlyphRun hresult(struct*;float;float;uint;struct*;struct*;struct*)_-ORIGINAL "DrawUnderline hresult(struct*;float;float;ptr;struct*);" & _;DrawUnderline hresult(struct*;float;float;struct*;struct*)-ORIGINAL DrawUnderline hresult(struct*;float;float;ptr;struct*) "DrawStrikethrough hresult(struct*;float;float;struct*;struct*);" & _ "DrawInlineObject hresult(struct*;float;float;struct*;bool;bool;struct*);" Global Const $tagIDWriteTypography = "AddFontFeature hresult(struct);" & _ "GetFontFeatureCount uint();" & _ "GetFontFeature hresult(uint;uint*;uint*);"