|  usp10.h (1.0422.3790.3959-Windows 5.0)  |   |  usp10.h (1.0626.6002.18005-Windows 6.0)  | 
 
       |   |  | 
      | skipping to change at line 14 |   | skipping to change at line 14 | 
       |   |  | 
      | */ |   | */ | 
       |   |  | 
      | #ifndef __usp10__ |   | #ifndef __usp10__ | 
      | #define __usp10__ |   | #define __usp10__ | 
      | #if _MSC_VER > 1000 |   | #if _MSC_VER > 1000 | 
      | #pragma once |   | #pragma once | 
      | #endif |   | #endif | 
       |   |  | 
      | #include <windows.h> |   | #include <windows.h> | 
       | 
       |   | #include <specstrings.h> | 
      | #ifdef __cplusplus |   | #ifdef __cplusplus | 
      | extern "C" { |   | extern "C" { | 
      | #endif |   | #endif | 
       |   |  | 
       | 
      | ///// Uniscribe build number |   |  | 
       |   |  | 
      | #define USPBUILD 0400 |   |  | 
      |                                                                                  |   |  | 
      | /////   USP - Unicode Complex Script processor |   | /////   USP - Unicode Complex Script processor | 
      | // |   | // | 
      | //      Copyright (c) Microsoft Corporation. All rights reserved. |   | //      Copyright (c) Microsoft Corporation. All rights reserved. | 
       |   |  | 
      | /////   SCRIPT |   | /////   SCRIPT | 
      | // |   | // | 
      | //      The SCRIPT enum is an opaque type used internally to identify |   | //      The SCRIPT enum is an opaque type used internally to identify | 
      | //      which shaping engine functions are used to process a given run. |   | //      which shaping engine functions are used to process a given run. | 
      | // |   | // | 
      | // |   | // | 
       |   |  | 
      | skipping to change at line 92 |   | skipping to change at line 89 | 
      | //      reference counts in it's font and shaper caches, and frees font data |   | //      reference counts in it's font and shaper caches, and frees font data | 
      | //      only when all sizes of the font are free, and shaper data only when |   | //      only when all sizes of the font are free, and shaper data only when | 
      | //      all fonts it supports are freed. |   | //      all fonts it supports are freed. | 
      | // |   | // | 
      | //      The client should free the SCRIPT_CACHE for a style when it discards |   | //      The client should free the SCRIPT_CACHE for a style when it discards | 
      | //      that style. |   | //      that style. | 
      | // |   | // | 
      | //      ScriptFreeCache always sets it's parameter to NULL to help avoid |   | //      ScriptFreeCache always sets it's parameter to NULL to help avoid | 
      | //      mis-referencing. |   | //      mis-referencing. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptFreeCache( |   | __checkReturn HRESULT WINAPI ScriptFreeCache( | 
      |     SCRIPT_CACHE   *psc);       //InOut  Cache handle |   |     __deref_inout_ecount(1) SCRIPT_CACHE   *psc);       //InOut  Cache handle | 
       |   |  | 
      | /////   SCRIPT_CONTROL |   | /////   SCRIPT_CONTROL | 
      | // |   | // | 
      | //      The SCRIPT_CONTROL structure provides itemization control flags to the |   | //      The SCRIPT_CONTROL structure provides itemization control flags to the | 
      | //      ScriptItemize function. |   | //      ScriptItemize function. | 
      | // |   | // | 
      | // |   | // | 
      | typedef struct tag_SCRIPT_CONTROL { |   | typedef struct tag_SCRIPT_CONTROL { | 
      |     DWORD   uDefaultLanguage    :16; // For NADS, also default for context |   |     DWORD   uDefaultLanguage    :16; // For NADS, also default for context | 
      |     DWORD   fContextDigits      :1;  // Means use previous script instead of uDe
faultLanguage |   |     DWORD   fContextDigits      :1;  // Means use previous script instead of uDe
faultLanguage | 
       |   |  | 
      |     // The following flags provide legacy support for GetCharacterPlacement feat
ures |   |     // The following flags provide legacy support for GetCharacterPlacement feat
ures | 
      |     DWORD   fInvertPreBoundDir  :1;  // Reading order of virtual item immediatel
y prior to string |   |     DWORD   fInvertPreBoundDir  :1;  // Reading order of virtual item immediatel
y prior to string | 
      |     DWORD   fInvertPostBoundDir :1;  // Reading order of virtual item immediatel
y following string |   |     DWORD   fInvertPostBoundDir :1;  // Reading order of virtual item immediatel
y following string | 
      |     DWORD   fLinkStringBefore   :1;  // Equivalent to presence of ZWJ before str
ing |   |     DWORD   fLinkStringBefore   :1;  // Equivalent to presence of ZWJ before str
ing | 
      |     DWORD   fLinkStringAfter    :1;  // Equivalent to presence of ZWJ after stri
ng |   |     DWORD   fLinkStringAfter    :1;  // Equivalent to presence of ZWJ after stri
ng | 
      |     DWORD   fNeutralOverride    :1;  // Causes all neutrals to be strong in the 
current embedding direction |   |     DWORD   fNeutralOverride    :1;  // Causes all neutrals to be strong in the 
current embedding direction | 
      |     DWORD   fNumericOverride    :1;  // Causes all numerals to be strong in the 
current embedding direction |   |     DWORD   fNumericOverride    :1;  // Causes all numerals to be strong in the 
current embedding direction | 
      |     DWORD   fLegacyBidiClass    :1;  // Causes plus and minus to be reated as ne
utrals, slash as a common separator |   |     DWORD   fLegacyBidiClass    :1;  // Causes plus and minus to be reated as ne
utrals, slash as a common separator | 
       | 
      |     DWORD   fReserved           :8; |   |     DWORD   fMergeNeutralItems  :1;  // Causes merging neutral characters into s | 
       |   | trong items, when possible | 
       |   |     DWORD   fReserved           :7; | 
      | } SCRIPT_CONTROL; |   | } SCRIPT_CONTROL; | 
      | // |   | // | 
      | // |   | // | 
      | //p     uDefaultLanguage: Language to use when Unicode values are ambiguous. |   | //p     uDefaultLanguage: Language to use when Unicode values are ambiguous. | 
      | //              Used by numeric processing to select digit shape when |   | //              Used by numeric processing to select digit shape when | 
      | //              fDigitSubstitute (see SCRIPT_STATE) is in force. |   | //              fDigitSubstitute (see SCRIPT_STATE) is in force. | 
      | // |   | // | 
      | //p     fContextDigits: Specifies that national digits are chosen according to |   | //p     fContextDigits: Specifies that national digits are chosen according to | 
      | //              the nearest previous strong text, rather than using |   | //              the nearest previous strong text, rather than using | 
      | //              uDefaultLanguage. |   | //              uDefaultLanguage. | 
       |   |  | 
      | skipping to change at line 311 |   | skipping to change at line 309 | 
      | //      o Change of shaping engine |   | //      o Change of shaping engine | 
      | //      o Change of direction |   | //      o Change of direction | 
      | // |   | // | 
      | //      The client may create multiple runs from each item returned by |   | //      The client may create multiple runs from each item returned by | 
      | //      ScriptItemize, but should not combine multiple items into a single run. |   | //      ScriptItemize, but should not combine multiple items into a single run. | 
      | // |   | // | 
      | //      Later the client will call ScriptShape for each run (when measuring or |   | //      Later the client will call ScriptShape for each run (when measuring or | 
      | //      rendering), and must pass the SCRIPT_ANALYSIS that ScriptItemize |   | //      rendering), and must pass the SCRIPT_ANALYSIS that ScriptItemize | 
      | //      returned. |   | //      returned. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptItemize( |   | __checkReturn HRESULT WINAPI ScriptItemize( | 
      |     const WCHAR           *pwcInChars,  // In   Unicode string to be itemized |   |     __in_ecount(cInChars) const WCHAR                   *pwcInChars,    // In    | 
      |     int                    cInChars,    // In   Codepoint count to itemize |   | Unicode string to be itemized | 
      |     int                    cMaxItems,   // In   Max length of itemization array |   |     int                                                 cInChars,       // In    | 
      |     const SCRIPT_CONTROL  *psControl,   // In   Analysis control (optional) |   | Codepoint count to itemize | 
      |     const SCRIPT_STATE    *psState,     // In   Initial bidi algorithm state (op |   |     int                                                 cMaxItems,      // In    | 
      | tional) |   | Max length of itemization array | 
      |     SCRIPT_ITEM           *pItems,      // Out  Array to receive itemization |   |     __in_ecount_opt(1) const SCRIPT_CONTROL             *psControl,     // In    | 
      |     int                   *pcItems);    // Out  Count of items processed (option |   | Analysis control (optional) | 
      | al) |   |     __in_ecount_opt(1) const SCRIPT_STATE               *psState,       // In    | 
       |   | Initial bidi algorithm state (optional) | 
       |   |     __out_ecount_part(cMaxItems, *pcItems) SCRIPT_ITEM  *pItems,        // Out   | 
       |   | Array to receive itemization | 
       |   |     __out_ecount(1) int                                 *pcItems);      // Out   | 
       |   | Count of items processed (optional) | 
       |   |  | 
      | ///// |   | ///// | 
      | // |   | // | 
      | // |   | // | 
      | //      Returns E_INVALIDARG if pwcInChars == NULL or cInChars == 0 |   | //      Returns E_INVALIDARG if pwcInChars == NULL or cInChars == 0 | 
      | //          or pItems == NULL or cMaxItems < 2. |   | //          or pItems == NULL or cMaxItems < 2. | 
      | // |   | // | 
      | //      Returns E_OUTOFMEMORY if the output buffer length (cMaxItems) is |   | //      Returns E_OUTOFMEMORY if the output buffer length (cMaxItems) is | 
      | //          insufficient. Note that in this case, as in all error cases, no |   | //          insufficient. Note that in this case, as in all error cases, no | 
      | //          items have been fully processed so no part of the output array |   | //          items have been fully processed so no part of the output array | 
       |   |  | 
      | skipping to change at line 425 |   | skipping to change at line 423 | 
      | // |   | // | 
      | //      piLogicalToVisual[0] is the relative visual position where the first |   | //      piLogicalToVisual[0] is the relative visual position where the first | 
      | //      logical run should be displayed - the leftmost display position being ze
ro. |   | //      logical run should be displayed - the leftmost display position being ze
ro. | 
      | // |   | // | 
      | //      The caller may request either piLogicalToVisual or piVisualToLogical |   | //      The caller may request either piLogicalToVisual or piVisualToLogical | 
      | //      or both. |   | //      or both. | 
      | // |   | // | 
      | //      Note: No other input is required since the embedding levels give all |   | //      Note: No other input is required since the embedding levels give all | 
      | //      necessary information for layout. |   | //      necessary information for layout. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptLayout( |   | __checkReturn HRESULT WINAPI ScriptLayout( | 
      |     int           cRuns,              // In   Number of runs to process |   |     int                             cRuns,                  // In   Number of ru | 
      |     const BYTE   *pbLevel,            // In   Array of run embedding levels |   | ns to process | 
      |     int          *piVisualToLogical,  // Out  List of run indices in visual orde |   |     __in_ecount(cRuns) const BYTE   *pbLevel,               // In   Array of run | 
      | r |   |  embedding levels | 
      |     int          *piLogicalToVisual); // Out  List of visual run positions |   |     __out_ecount_full_opt(cRuns) int    *piVisualToLogical,     // Out  List of  | 
       |   | run indices in visual order | 
       |   |     __out_ecount_full_opt(cRuns) int    *piLogicalToVisual);    // Out  List of  | 
       |   | visual run positions | 
       |   |  | 
      | /////   SCRIPT_JUSTIFY |   | /////   SCRIPT_JUSTIFY | 
      | // |   | // | 
      | //      The script justification enumeration provides the client with the |   | //      The script justification enumeration provides the client with the | 
      | //      glyph characteristic information it needs to implement justification. |   | //      glyph characteristic information it needs to implement justification. | 
       |   |  | 
      | typedef enum tag_SCRIPT_JUSTIFY { |   | typedef enum tag_SCRIPT_JUSTIFY { | 
      |     SCRIPT_JUSTIFY_NONE           = 0,   // Justification can't be applied at th
is glyph |   |     SCRIPT_JUSTIFY_NONE           = 0,   // Justification can't be applied at th
is glyph | 
      |     SCRIPT_JUSTIFY_ARABIC_BLANK   = 1,   // This glyph represents a blank in an 
Arabic run |   |     SCRIPT_JUSTIFY_ARABIC_BLANK   = 1,   // This glyph represents a blank in an 
Arabic run | 
      |     SCRIPT_JUSTIFY_CHARACTER      = 2,   // Inter-character justification point 
follows this glyph |   |     SCRIPT_JUSTIFY_CHARACTER      = 2,   // Inter-character justification point 
follows this glyph | 
       |   |  | 
      | skipping to change at line 452 |   | skipping to change at line 450 | 
      |     SCRIPT_JUSTIFY_RESERVED2      = 5,   // Reserved #2 |   |     SCRIPT_JUSTIFY_RESERVED2      = 5,   // Reserved #2 | 
      |     SCRIPT_JUSTIFY_RESERVED3      = 6,   // Reserved #3 |   |     SCRIPT_JUSTIFY_RESERVED3      = 6,   // Reserved #3 | 
      |     SCRIPT_JUSTIFY_ARABIC_NORMAL  = 7,   // Normal Middle-Of-Word glyph that con
nects to the right (begin) |   |     SCRIPT_JUSTIFY_ARABIC_NORMAL  = 7,   // Normal Middle-Of-Word glyph that con
nects to the right (begin) | 
      |     SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8,   // Kashida(U+640) in middle of word |   |     SCRIPT_JUSTIFY_ARABIC_KASHIDA = 8,   // Kashida(U+640) in middle of word | 
      |     SCRIPT_JUSTIFY_ARABIC_ALEF    = 9,   // Final form of Alef-like (U+627, U+62
5, U+623, U+632) |   |     SCRIPT_JUSTIFY_ARABIC_ALEF    = 9,   // Final form of Alef-like (U+627, U+62
5, U+623, U+632) | 
      |     SCRIPT_JUSTIFY_ARABIC_HA      = 10,  // Final form of Ha (U+647) |   |     SCRIPT_JUSTIFY_ARABIC_HA      = 10,  // Final form of Ha (U+647) | 
      |     SCRIPT_JUSTIFY_ARABIC_RA      = 11,  // Final form of Ra (U+631) |   |     SCRIPT_JUSTIFY_ARABIC_RA      = 11,  // Final form of Ra (U+631) | 
      |     SCRIPT_JUSTIFY_ARABIC_BA      = 12,  // Middle-Of-Word form of Ba (U+628) |   |     SCRIPT_JUSTIFY_ARABIC_BA      = 12,  // Middle-Of-Word form of Ba (U+628) | 
      |     SCRIPT_JUSTIFY_ARABIC_BARA    = 13,  // Ligature of alike (U+628,U+631) |   |     SCRIPT_JUSTIFY_ARABIC_BARA    = 13,  // Ligature of alike (U+628,U+631) | 
      |     SCRIPT_JUSTIFY_ARABIC_SEEN    = 14,  // Highest priority: Initial shape of S
een(U+633) (end) |   |     SCRIPT_JUSTIFY_ARABIC_SEEN    = 14,  // Highest priority: Initial shape of S
een(U+633) (end) | 
       | 
      |     SCRIPT_JUSTIFY_RESERVED4      = 15,  // Reserved #4 |   |     SCRIPT_JUSTIFY_ARABIC_SEEN_M  = 15,  // Reserved #4 | 
      | } SCRIPT_JUSTIFY; |   | } SCRIPT_JUSTIFY; | 
       |   |  | 
      | /////   SCRIPT_VISATTR |   | /////   SCRIPT_VISATTR | 
      | // |   | // | 
      | //      The visual (glyph) attribute buffer generated by ScriptShape |   | //      The visual (glyph) attribute buffer generated by ScriptShape | 
      | //      identifies clusters and justification points: |   | //      identifies clusters and justification points: | 
       |   |  | 
      | typedef struct tag_SCRIPT_VISATTR { |   | typedef struct tag_SCRIPT_VISATTR { | 
      |     WORD           uJustification   :4;  // Justification class |   |     WORD           uJustification   :4;  // Justification class | 
      |     WORD           fClusterStart    :1;  // First glyph of representation of clu
ster |   |     WORD           fClusterStart    :1;  // First glyph of representation of clu
ster | 
       |   |  | 
      | skipping to change at line 504 |   | skipping to change at line 502 | 
      | //      There are also special cases like invalid character representations, |   | //      There are also special cases like invalid character representations, | 
      | //      where extra glyphs are added to represent the invalid sequence. |   | //      where extra glyphs are added to represent the invalid sequence. | 
      | // |   | // | 
      | //      A reasonable guess might be to provide a glyph buffer 1.5 times the |   | //      A reasonable guess might be to provide a glyph buffer 1.5 times the | 
      | //      length of the character buffer, plus a 16 glyph fixed addition for |   | //      length of the character buffer, plus a 16 glyph fixed addition for | 
      | //      rare cases like invalid sequenece representation. |   | //      rare cases like invalid sequenece representation. | 
      | // |   | // | 
      | //      If ScriptShape returns E_OUTOFMEMORY it will be necessary to recall |   | //      If ScriptShape returns E_OUTOFMEMORY it will be necessary to recall | 
      | //      it, possibly more than once, until a large enough buffer is found. |   | //      it, possibly more than once, until a large enough buffer is found. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptShape( |   | __checkReturn HRESULT WINAPI ScriptShape( | 
      |     HDC                 hdc,            // In    Optional (see under caching) |   |     HDC                                                     hdc,            // I | 
      |     SCRIPT_CACHE       *psc,            // InOut Cache handle |   | n    Optional (see under caching) | 
      |     const WCHAR        *pwcChars,       // In    Logical unicode run |   |     __deref_inout_ecount(1) SCRIPT_CACHE                    *psc,           // I | 
      |     int                 cChars,         // In    Length of unicode run |   | nOut Cache handle | 
      |     int                 cMaxGlyphs,     // In    Max glyphs to generate |   |     __in_ecount(cChars) const WCHAR                         *pwcChars,      // I | 
      |     SCRIPT_ANALYSIS    *psa,            // InOut Result of ScriptItemize (may ha |   | n    Logical unicode run | 
      | ve fNoGlyphIndex set) |   |     int                                                     cChars,         // I | 
      |     WORD               *pwOutGlyphs,    // Out   Output glyph buffer |   | n    Length of unicode run | 
      |     WORD               *pwLogClust,     // Out   Logical clusters |   |     int                                                     cMaxGlyphs,     // I | 
      |     SCRIPT_VISATTR     *psva,           // Out   Visual glyph attributes |   | n    Max glyphs to generate | 
      |     int                *pcGlyphs);      // Out   Count of glyphs generated |   |     __inout_ecount(1) SCRIPT_ANALYSIS                       *psa,           // I | 
       |   | nOut Result of ScriptItemize (may have fNoGlyphIndex set) | 
       |   |     __out_ecount_part(cMaxGlyphs, *pcGlyphs) WORD           *pwOutGlyphs,   // O | 
       |   | ut   Output glyph buffer | 
       |   |     __out_ecount_full(cChars) WORD                          *pwLogClust,    // O | 
       |   | ut   Logical clusters | 
       |   |     __out_ecount_part(cMaxGlyphs, *pcGlyphs) SCRIPT_VISATTR *psva,          // O | 
       |   | ut   Visual glyph attributes | 
       |   |     __out_ecount(1) int                                     *pcGlyphs);     // O | 
       |   | ut   Count of glyphs generated | 
       |   |  | 
      | ///// |   | ///// | 
      | // |   | // | 
      | //      Returns E_OUTOFMEMORY if the output buffer length (cMaxGlyphs) is |   | //      Returns E_OUTOFMEMORY if the output buffer length (cMaxGlyphs) is | 
      | //          insufficient. Note that in this case, as in all error cases, the |   | //          insufficient. Note that in this case, as in all error cases, the | 
      | //          content of all output parameters are undefined. |   | //          content of all output parameters are undefined. | 
      | // |   | // | 
      | //p     psa: Pass the SCRIPT_ANALYSIS field of the SCRIPT_ITEM entry for this |   | //p     psa: Pass the SCRIPT_ANALYSIS field of the SCRIPT_ITEM entry for this | 
      | //          item. (The SCRIPT_ITEM array is returned by ScriptItemize.) |   | //          item. (The SCRIPT_ITEM array is returned by ScriptItemize.) | 
      | // |   | // | 
       |   |  | 
      | skipping to change at line 602 |   | skipping to change at line 600 | 
      | //      All glyph related arrays are in visual order unless the fLogicalOrder |   | //      All glyph related arrays are in visual order unless the fLogicalOrder | 
      | //      flag is set in psa. |   | //      flag is set in psa. | 
       |   |  | 
      | #ifndef LSDEFS_DEFINED |   | #ifndef LSDEFS_DEFINED | 
      | typedef struct tagGOFFSET { |   | typedef struct tagGOFFSET { | 
      |     LONG  du; |   |     LONG  du; | 
      |     LONG  dv; |   |     LONG  dv; | 
      | } GOFFSET; |   | } GOFFSET; | 
      | #endif |   | #endif | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptPlace( |   | __checkReturn HRESULT WINAPI ScriptPlace( | 
      |     HDC                     hdc,        // In    Optional (see under caching) |   |     HDC                                         hdc,        // In    Optional (s | 
      |     SCRIPT_CACHE           *psc,        // InOut Cache handle |   | ee under caching) | 
      |     const WORD             *pwGlyphs,   // In    Glyph buffer from prior ScriptS |   |     __deref_inout_ecount(1) SCRIPT_CACHE        *psc,       // InOut Cache handl | 
      | hape call |   | e | 
      |     int                     cGlyphs,    // In    Number of glyphs |   |     __in_ecount(cGlyphs) const WORD             *pwGlyphs,  // In    Glyph buffe | 
      |     const SCRIPT_VISATTR   *psva,       // In    Visual glyph attributes |   | r from prior ScriptShape call | 
      |     SCRIPT_ANALYSIS        *psa,        // InOut Result of ScriptItemize (may ha |   |     int                                         cGlyphs,    // In    Number of g | 
      | ve fNoGlyphIndex set) |   | lyphs | 
      |     int                    *piAdvance,  // Out   Advance wdiths |   |     __in_ecount(cGlyphs) const SCRIPT_VISATTR   *psva,      // In    Visual glyp | 
      |     GOFFSET                *pGoffset,   // Out   x,y offset for combining glyph |   | h attributes | 
      |     ABC                    *pABC);      // Out   Composite ABC for the whole run |   |     __inout_ecount(1) SCRIPT_ANALYSIS           *psa,       // InOut Result of S | 
      |  (Optional) |   | criptItemize (may have fNoGlyphIndex set) | 
       |   |     __out_ecount_full(cGlyphs) int              *piAdvance, // Out   Advance wdi | 
       |   | ths | 
       |   |     __out_ecount_full_opt(cGlyphs) GOFFSET      *pGoffset,  // Out   x,y offset  | 
       |   | for combining glyph | 
       |   |     __out_ecount(1) ABC                         *pABC);     // Out   Composite A | 
       |   | BC for the whole run (Optional) | 
       |   |  | 
      | /////   ScriptTextOut |   | /////   ScriptTextOut | 
      | // |   | // | 
      | //      The ScriptTextOut function takes the output of both ScriptShape and |   | //      The ScriptTextOut function takes the output of both ScriptShape and | 
      | //      ScriptPlace calls and calls the operating system ExtTextOut function |   | //      ScriptPlace calls and calls the operating system ExtTextOut function | 
      | //      appropriately. If the last parameter is not null, GDI's ExtTextOutW call
s |   | //      appropriately. If the last parameter is not null, GDI's ExtTextOutW call
s | 
      | //      are routed to this function. |   | //      are routed to this function. | 
      | // |   | // | 
      | //      All arrays are in visual order unless the fLogicalOrder flag is set in |   | //      All arrays are in visual order unless the fLogicalOrder flag is set in | 
      | //      psa. |   | //      psa. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptTextOut( |   | __checkReturn HRESULT WINAPI ScriptTextOut( | 
      |     const HDC                           hdc,            // In     OS handle to d |   |     const HDC                               hdc,            // In     OS handle  | 
      | evice context (required) |   | to device context (required) | 
      |     SCRIPT_CACHE                        *psc,           // InOut  Cache handle |   |     __deref_inout_ecount(1) SCRIPT_CACHE    *psc,           // InOut  Cache hand | 
      |     int                                 x,              // In     x,y position f |   | le | 
      | or first glyph |   |     int                                     x,              // In     x,y positi | 
      |     int                                 y,              // In |   | on for first glyph | 
      |     UINT                                fuOptions,      // In     ExtTextOut opt |   |     int                                     y,              // In | 
      | ions |   |     UINT                                    fuOptions,      // In     ExtTextOut | 
      |     const RECT                          *lprc,          // In     optional clipp |   |  options | 
      | ing/opaquing rectangle |   |     __in_ecount_opt(1) const RECT           *lprc,          // In     optional c | 
      |     const SCRIPT_ANALYSIS               *psa,           // In     Result of Scri |   | lipping/opaquing rectangle | 
      | ptItemize |   |     __in_ecount(1) const SCRIPT_ANALYSIS    *psa,           // In     Result of  | 
      |     const WCHAR                         *pwcReserved,   // In     Reserved (requ |   | ScriptItemize | 
      | ires NULL) |   |     __reserved const WCHAR                  *pwcReserved,   // In     Reserved ( | 
      |     int                                 iReserved,      // In     Reserved (requ |   | requires NULL) | 
      | ires 0) |   |     __reserved int                          iReserved,      // In     Reserved ( | 
      |     const WORD                          *pwGlyphs,      // In     Glyph buffer f |   | requires 0) | 
      | rom prior ScriptShape call |   |     __in_ecount(cGlyphs) const WORD         *pwGlyphs,      // In     Glyph buff | 
      |     int                                 cGlyphs,        // In     Number of glyp |   | er from prior ScriptShape call | 
      | hs |   |     int                                     cGlyphs,        // In     Number of  | 
      |     const int                           *piAdvance,     // In     Advance widths |   | glyphs | 
      |  from ScriptPlace |   |     __in_ecount(cGlyphs) const int          *piAdvance,     // In     Advance wi | 
      |     const int                           *piJustify,     // In     Justified adva |   | dths from ScriptPlace | 
      | nce widths (optional) |   |     __in_ecount_opt(cGlyphs) const int      *piJustify,     // In     Justified  | 
      |     const GOFFSET                       *pGoffset);     // In     x,y offset for |   | advance widths (optional) | 
      |  combining glyph |   |     __in_ecount(cGlyphs) const GOFFSET      *pGoffset);     // In     x,y offset | 
       |   |  for combining glyph | 
       |   |  | 
      | ///// |   | ///// | 
      | // |   | // | 
      | //      The caller should normally use SetTextAlign(hdc, TA_RIGHT) before |   | //      The caller should normally use SetTextAlign(hdc, TA_RIGHT) before | 
      | //      calling ScriptTextOut with an RTL item inlogical order. |   | //      calling ScriptTextOut with an RTL item inlogical order. | 
      | // |   | // | 
      | //      The piJustify array provides requested cell widths for each glyph. |   | //      The piJustify array provides requested cell widths for each glyph. | 
      | //      When the piJustify width of a glyph differs from the unjustified |   | //      When the piJustify width of a glyph differs from the unjustified | 
      | //      width (in PiAdvance), space is added to or removed from the glyph |   | //      width (in PiAdvance), space is added to or removed from the glyph | 
      | //      cell at it's trailing edge. The glyph is always aligned with the |   | //      cell at it's trailing edge. The glyph is always aligned with the | 
       |   |  | 
      | skipping to change at line 701 |   | skipping to change at line 699 | 
      | //      intercharacter spacing if there are no inter-word points. |   | //      intercharacter spacing if there are no inter-word points. | 
      | // |   | // | 
      | //      The justified advance widths generated in ScriptJustify should be |   | //      The justified advance widths generated in ScriptJustify should be | 
      | //      passed to ScriptTextOut in the piJustify paramter. |   | //      passed to ScriptTextOut in the piJustify paramter. | 
      | // |   | // | 
      | //      ScriptJustify creates a justify array containing updated advance |   | //      ScriptJustify creates a justify array containing updated advance | 
      | //      widths for each glyph. Where a glyphs advance width is increased, it |   | //      widths for each glyph. Where a glyphs advance width is increased, it | 
      | //      is expected that the extra width will be rendered to the right of the |   | //      is expected that the extra width will be rendered to the right of the | 
      | //      glyph, with as white space or, for Arabic text, as kashida. |   | //      glyph, with as white space or, for Arabic text, as kashida. | 
      | ///// |   | ///// | 
       | 
      | HRESULT WINAPI ScriptJustify( |   | __checkReturn HRESULT WINAPI ScriptJustify( | 
      |     const SCRIPT_VISATTR  *psva,        // In   Collected visual attributes for  |   |     __in_ecount(cGlyphs) const SCRIPT_VISATTR   *psva,          // In   Collecte | 
      | entire line |   | d visual attributes for entire line | 
      |     const int             *piAdvance,   // In   Advance widths from ScriptPlace |   |     __in_ecount(cGlyphs) const int              *piAdvance,     // In   Advance  | 
      |     int                    cGlyphs,     // In   Size of all arrays |   | widths from ScriptPlace | 
      |     int                    iDx,         // In   Desired width change, either inc |   |     int                                         cGlyphs,        // In   Size of  | 
      | rease or descrease |   | all arrays | 
      |     int                    iMinKashida, // In   Minimum length of continuous kas |   |     int                                         iDx,            // In   Desired  | 
      | hida glyph to generate |   | width change, either increase or descrease | 
      |     int                   *piJustify);  // Out  Updated advance widths to pass t |   |     int                                         iMinKashida,    // In   Minimum  | 
      | o ScriptTextOut |   | length of continuous kashida glyph to generate | 
       |   |     __out_ecount_full(cGlyphs) int              *piJustify);    // Out  Updated  | 
       |   | advance widths to pass to ScriptTextOut | 
       |   |  | 
      | /////   SCRIPT_LOGATTR |   | /////   SCRIPT_LOGATTR | 
      | // |   | // | 
      | //      The SCRIPT_LOGATTR structure describes attributes of logical |   | //      The SCRIPT_LOGATTR structure describes attributes of logical | 
      | //      characters useful when editing and formatting text. |   | //      characters useful when editing and formatting text. | 
      | // |   | // | 
      | //      Note that for wordbreaking and linebreaking, if the first character of |   | //      Note that for wordbreaking and linebreaking, if the first character of | 
      | //      the run passed in is not whitespace, the client needs to check whether |   | //      the run passed in is not whitespace, the client needs to check whether | 
      | //      the last character of the previous run is whitespace to determine if |   | //      the last character of the previous run is whitespace to determine if | 
      | //      the first character of this run is the start of a word. |   | //      the first character of this run is the start of a word. | 
       |   |  | 
      | skipping to change at line 779 |   | skipping to change at line 777 | 
      | //      returned by ScriptShape, however ScriptBreak is considerably faster in |   | //      returned by ScriptShape, however ScriptBreak is considerably faster in | 
      | //      implementation and does not require an hdc to be prepared. |   | //      implementation and does not require an hdc to be prepared. | 
      | // |   | // | 
      | //      The fWordStop, fSoftBreak and fWhiteSpace flags are only available |   | //      The fWordStop, fSoftBreak and fWhiteSpace flags are only available | 
      | //      through ScriptBreak. |   | //      through ScriptBreak. | 
      | // |   | // | 
      | //      Most shaping engines that identify invalid sequences do so by setting |   | //      Most shaping engines that identify invalid sequences do so by setting | 
      | //      the fInvalid flag in ScriptBreak. The fInvalidLogAttr flag in |   | //      the fInvalid flag in ScriptBreak. The fInvalidLogAttr flag in | 
      | //      ScriptProperties identifies which scripts do this. |   | //      ScriptProperties identifies which scripts do this. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptBreak( |   | __checkReturn HRESULT WINAPI ScriptBreak( | 
      |     const WCHAR            *pwcChars,  // In   Logical unicode item |   |     __in_ecount(cChars) const WCHAR             *pwcChars,  // In   Logical unic | 
      |     int                     cChars,    // In   Length of unicode item |   | ode item | 
      |     const SCRIPT_ANALYSIS  *psa,       // In   Result of earlier ScriptItemize c |   |     int                                         cChars,     // In   Length of un | 
      | all |   | icode item | 
      |     SCRIPT_LOGATTR         *psla);     // Out  Logical character attributes |   |     __in_ecount(1) const SCRIPT_ANALYSIS        *psa,       // In   Result of ea | 
       |   | rlier ScriptItemize call | 
       |   |     __out_ecount_full(cChars) SCRIPT_LOGATTR    *psla);     // Out  Logical char | 
       |   | acter attributes | 
       |   |  | 
      | /////   ScriptCPtoX |   | /////   ScriptCPtoX | 
      | // |   | // | 
      | //      The ScriptCPtoX function returns the x offset from the left end |   | //      The ScriptCPtoX function returns the x offset from the left end | 
      | //      (!fLogical) or leading edge (fLogical) of a run to either the leading |   | //      (!fLogical) or leading edge (fLogical) of a run to either the leading | 
      | //      or the trailing edge of a logical character cluster. |   | //      or the trailing edge of a logical character cluster. | 
      | // |   | // | 
      | //      iCP is the offset of any logical character in the cluster. |   | //      iCP is the offset of any logical character in the cluster. | 
      | // |   | // | 
      | //      For scripts where the caret may conventionally be placed into the |   | //      For scripts where the caret may conventionally be placed into the | 
      | //      middle of clusters (e.g. Arabic, Hebrew), the returned X may be |   | //      middle of clusters (e.g. Arabic, Hebrew), the returned X may be | 
      | //      an interpolated position for any codepoint in the line. |   | //      an interpolated position for any codepoint in the line. | 
      | // |   | // | 
      | //      For scripts where the caret is conventionally snapped to the boundaries |   | //      For scripts where the caret is conventionally snapped to the boundaries | 
      | //      of clusters, (e.g. Thai, Indian), the resulting X position will be |   | //      of clusters, (e.g. Thai, Indian), the resulting X position will be | 
      | //      snapped to the requested edge of the cluster containing CP. |   | //      snapped to the requested edge of the cluster containing CP. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptCPtoX( |   | __checkReturn HRESULT WINAPI ScriptCPtoX( | 
      |     int                     iCP,        // In   Logical character position in ru |   |     int                                         iCP,            // In   Logical  | 
      | n |   | character position in run | 
      |     BOOL                    fTrailing,  // In   Which edge (default - leading) |   |     BOOL                                        fTrailing,      // In   Which ed | 
      |     int                     cChars,     // In   Count of logical codepoints in r |   | ge (default - leading) | 
      | un |   |     int                                         cChars,         // In   Count of | 
      |     int                     cGlyphs,    // In   Count of glyphs in run |   |  logical codepoints in run | 
      |     const WORD             *pwLogClust, // In   Logical clusters |   |     int                                         cGlyphs,        // In   Count of | 
      |     const SCRIPT_VISATTR   *psva,       // In   Visual glyph attributes array |   |  glyphs in run | 
      |     const int              *piAdvance,  // In   Advance widths |   |     __in_ecount(cChars) const WORD              *pwLogClust,    // In   Logical  | 
      |     const SCRIPT_ANALYSIS  *psa,        // In   Script analysis from item attrib |   | clusters | 
      | utes |   |     __in_ecount(cGlyphs) const SCRIPT_VISATTR   *psva,          // In   Visual g | 
      |     int                    *piX);       // Out  Resulting X position |   | lyph attributes array | 
       |   |     __in_ecount(cGlyphs) const int              *piAdvance,     // In   Advance  | 
       |   | widths | 
       |   |     __in_ecount(1) const SCRIPT_ANALYSIS        *psa,           // In   Script a | 
       |   | nalysis from item attributes | 
       |   |     int                                         *piX);          // Out  Resultin | 
       |   | g X position | 
       |   |  | 
      | /////   ScriptXtoCP |   | /////   ScriptXtoCP | 
      | // |   | // | 
      | //      The ScriptXtoCP function converts an x offset from the left end |   | //      The ScriptXtoCP function converts an x offset from the left end | 
      | //      (!fLogical) or leading edge (fLogical) of a run to a logical |   | //      (!fLogical) or leading edge (fLogical) of a run to a logical | 
      | //      character position and a flag that indicates whether the X position |   | //      character position and a flag that indicates whether the X position | 
      | //      fell in the leading or the trailing half of the character. |   | //      fell in the leading or the trailing half of the character. | 
      | // |   | // | 
      | //      For scripts where the cursor may conventionally be placed into the |   | //      For scripts where the cursor may conventionally be placed into the | 
      | //      middle of clusters (e.g. Arabic, Hebrew), the returned CP may be |   | //      middle of clusters (e.g. Arabic, Hebrew), the returned CP may be | 
       |   |  | 
      | skipping to change at line 837 |   | skipping to change at line 835 | 
      | //      zero, or the number of codepoints in the cluster. |   | //      zero, or the number of codepoints in the cluster. | 
      | // |   | // | 
      | //      Thus the appropriate cursor position for a mouse hit is always the |   | //      Thus the appropriate cursor position for a mouse hit is always the | 
      | //      returned CP plus the value of fTrailing. |   | //      returned CP plus the value of fTrailing. | 
      | // |   | // | 
      | //      If the X positition passed is not in the item at all, the resulting |   | //      If the X positition passed is not in the item at all, the resulting | 
      | //      position will be the trailing edge of character -1 (for X positions |   | //      position will be the trailing edge of character -1 (for X positions | 
      | //      before the item), or the leading edge of character 'cChars' (for |   | //      before the item), or the leading edge of character 'cChars' (for | 
      | //      X positions following the item). |   | //      X positions following the item). | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptXtoCP( |   | __checkReturn HRESULT WINAPI ScriptXtoCP( | 
      |     int                     iX,             // In   X offset from left of run |   |     int                                         iX,             // In   X offset | 
      |     int                     cChars,         // In   Count of logical codepoints  |   |  from left of run | 
      | in run |   |     int                                         cChars,         // In   Count of | 
      |     int                     cGlyphs,        // In   Count of glyphs in run |   |  logical codepoints in run | 
      |     const WORD             *pwLogClust,     // In   Logical clusters |   |     int                                         cGlyphs,        // In   Count of | 
      |     const SCRIPT_VISATTR   *psva,           // In   Visual glyph attributes |   |  glyphs in run | 
      |     const int              *piAdvance,      // In   Advance widths |   |     __in_ecount(cChars) const WORD              *pwLogClust,    // In   Logical  | 
      |     const SCRIPT_ANALYSIS  *psa,            // In   Script analysis from item at |   | clusters | 
      | tributes |   |     __in_ecount(cGlyphs) const SCRIPT_VISATTR   *psva,          // In   Visual g | 
      |     int                    *piCP,           // Out  Resulting character position |   | lyph attributes | 
      |     int                    *piTrailing);    // Out  Leading or trailing half fla |   |     __in_ecount(cGlyphs) const int              *piAdvance,     // In   Advance  | 
      | g |   | widths | 
       |   |     __in_ecount(1) const SCRIPT_ANALYSIS        *psa,           // In   Script a | 
       |   | nalysis from item attributes | 
       |   |     __out_ecount(1) int                         *piCP,          // Out  Resultin | 
       |   | g character position | 
       |   |     __out_ecount(1) int                         *piTrailing);   // Out  Leading  | 
       |   | or trailing half flag | 
       |   |  | 
      | /////   Relationship between caret positions, justifications points and clusters |   | /////   Relationship between caret positions, justifications points and clusters | 
      | // |   | // | 
      | // |   | // | 
      | //t     Job                              | Uniscribe support |   | //t     Job                              | Uniscribe support | 
      | //t     -------------------------------- | -------------------------------------
------------------- |   | //t     -------------------------------- | -------------------------------------
------------------- | 
      | //t     Caret move by character cluster  | LogClust or VISATTR.fClusterStart or 
LOGATTR.fCharStop |   | //t     Caret move by character cluster  | LogClust or VISATTR.fClusterStart or 
LOGATTR.fCharStop | 
      | //t     Line breaking between characters | LogClust or VISATTR.fClusterStart or 
LOGATTR.fCharStop |   | //t     Line breaking between characters | LogClust or VISATTR.fClusterStart or 
LOGATTR.fCharStop | 
      | //t     Caret move by word               | LOGATTR.fWordStop |   | //t     Caret move by word               | LOGATTR.fWordStop | 
      | //t     Line breaking between words      | LOGATTR.fWordStop |   | //t     Line breaking between words      | LOGATTR.fWordStop | 
       |   |  | 
      | skipping to change at line 1060 |   | skipping to change at line 1058 | 
      | //      leading edge of the run for iCharPos <0, and the trailing edge of the |   | //      leading edge of the run for iCharPos <0, and the trailing edge of the | 
      | //      run for iCharPos >=length. |   | //      run for iCharPos >=length. | 
      | /////   ScriptGetLogicalWidths |   | /////   ScriptGetLogicalWidths | 
      | // |   | // | 
      | //      Converts visual withs in piAdvance into logical widths, |   | //      Converts visual withs in piAdvance into logical widths, | 
      | //      one per original character, in logical order. |   | //      one per original character, in logical order. | 
      | // |   | // | 
      | //      Ligature glyphs widths are divided evenly amongst the characters |   | //      Ligature glyphs widths are divided evenly amongst the characters | 
      | //      they represent. |   | //      they represent. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptGetLogicalWidths( |   | __checkReturn HRESULT WINAPI ScriptGetLogicalWidths( | 
      |     const SCRIPT_ANALYSIS  *psa,            // In   Script analysis from item at |   |     __in_ecount(1) const SCRIPT_ANALYSIS        *psa,           // In   Script a | 
      | tributes |   | nalysis from item attributes | 
      |     int                     cChars,         // In   Count of logical codepoints  |   |     int                                         cChars,         // In   Count of | 
      | in run |   |  logical codepoints in run | 
      |     int                     cGlyphs,        // In   Count of glyphs in run |   |     int                                         cGlyphs,        // In   Count of | 
      |     const int              *piGlyphWidth,   // In   Advance widths |   |  glyphs in run | 
      |     const WORD             *pwLogClust,     // In   Logical clusters |   |     __in_ecount(cGlyphs) const int              *piGlyphWidth,  // In   Advance  | 
      |     const SCRIPT_VISATTR   *psva,           // In   Visual glyph attributes |   | widths | 
      |     int                    *piDx);          // Out  Logical widths |   |     __in_ecount(cChars) const WORD              *pwLogClust,    // In   Logical  | 
       |   | clusters | 
       |   |     __in_ecount(cGlyphs) const SCRIPT_VISATTR   *psva,          // In   Visual g | 
       |   | lyph attributes | 
       |   |     __in_ecount(cChars) int                     *piDx);         // Out  Logical  | 
       |   | widths | 
       |   |  | 
      | ///// |   | ///// | 
      | //      ScriptGetLogicalWidths is useful for recording widths in a |   | //      ScriptGetLogicalWidths is useful for recording widths in a | 
      | //      font independant manner. By passing the recorded logical widths |   | //      font independant manner. By passing the recorded logical widths | 
      | //      to ScriptApplyLogicalWidths, a block of text can be replayed in the |   | //      to ScriptApplyLogicalWidths, a block of text can be replayed in the | 
      | //      same boundaries with acceptable loss of quality even when the original |   | //      same boundaries with acceptable loss of quality even when the original | 
      | //      font is not available. |   | //      font is not available. | 
      | /////   ScriptApplyLogicalWidth |   | /////   ScriptApplyLogicalWidth | 
      | // |   | // | 
      | //      Accepts an array of advance widths in logical order, corresponding |   | //      Accepts an array of advance widths in logical order, corresponding | 
      | //      one to one with codepoints, and generates an array of glyph widths |   | //      one to one with codepoints, and generates an array of glyph widths | 
      | //      suitable for passing to the piJustify parameter of ScriptTextOut. |   | //      suitable for passing to the piJustify parameter of ScriptTextOut. | 
      | // |   | // | 
      | //      ScriptApplyLogicalWidth may be used to reapply logical widths |   | //      ScriptApplyLogicalWidth may be used to reapply logical widths | 
      | //      obtained with ScriptGetLogicalWidths. It may be useful in situations |   | //      obtained with ScriptGetLogicalWidths. It may be useful in situations | 
      | //      such as metafiling, where it is necessary to record and reapply |   | //      such as metafiling, where it is necessary to record and reapply | 
      | //      advance width information in a font independant manner. |   | //      advance width information in a font independant manner. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptApplyLogicalWidth( |   | __checkReturn HRESULT WINAPI ScriptApplyLogicalWidth( | 
      |     const int              *piDx,        // In     Logical dx array to apply |   |     __in_ecount(cChars) const int               *piDx,          // In     Logica | 
      |     int                     cChars,      // In     Count of logical codepoints i |   | l dx array to apply | 
      | n run |   |     int                                         cChars,         // In     Count  | 
      |     int                     cGlyphs,     // In     Glyph count |   | of logical codepoints in run | 
      |     const WORD             *pwLogClust,  // In     Logical clusters |   |     int                                         cGlyphs,        // In     Glyph  | 
      |     const SCRIPT_VISATTR   *psva,        // In     Visual attributes from Script |   | count | 
      | Shape/Place |   |     __in_ecount(cChars) const WORD              *pwLogClust,    // In     Logica | 
      |     const int              *piAdvance,   // In     Glyph advance widths from Scr |   | l clusters | 
      | iptPlace |   |     __in_ecount(cGlyphs) const SCRIPT_VISATTR   *psva,          // In     Visual | 
      |     const SCRIPT_ANALYSIS  *psa,         // In     Script analysis from item att |   |  attributes from ScriptShape/Place | 
      | ributes |   |     __in_ecount(cGlyphs) const int              *piAdvance,     // In     Glyph  | 
      |     ABC                    *pABC,        // InOut  Updated item ABC width (optio |   | advance widths from ScriptPlace | 
      | nal) |   |     __in_ecount(1) const SCRIPT_ANALYSIS        *psa,           // In     Script | 
      |     int                    *piJustify);  // Out    Resulting glyph advance width |   |  analysis from item attributes | 
      | s for ScriptTextOut |   |     __inout_ecount_opt(1) ABC                   *pABC,          // InOut  Update | 
       |   | d item ABC width (optional) | 
       |   |     __out_ecount_full(cGlyphs) int              *piJustify);    // Out    Result | 
       |   | ing glyph advance widths for ScriptTextOut | 
       |   |  | 
      | ///// |   | ///// | 
      | //p     piDx: Pointer to an array of dx widths in logical order, one per codepoi
nt. |   | //p     piDx: Pointer to an array of dx widths in logical order, one per codepoi
nt. | 
      | // |   | // | 
      | //p     cChars: Count of the logical codepoints in the run. |   | //p     cChars: Count of the logical codepoints in the run. | 
      | // |   | // | 
      | //p     cGlyphs: Glyph count. |   | //p     cGlyphs: Glyph count. | 
      | // |   | // | 
      | //p     pwLogClust: Pointer to an array of logical clusters from ScriptShape |   | //p     pwLogClust: Pointer to an array of logical clusters from ScriptShape | 
      | // |   | // | 
       |   |  | 
      | skipping to change at line 1139 |   | skipping to change at line 1137 | 
      | // |   | // | 
      | //      The caller may scan the returned glyph buffer looking for the default |   | //      The caller may scan the returned glyph buffer looking for the default | 
      | //      glyph to determine which characters are not available. (The default |   | //      glyph to determine which characters are not available. (The default | 
      | //      glyph index for the selected font should be determined by calling |   | //      glyph index for the selected font should be determined by calling | 
      | //      ScriptGetFontProperties). |   | //      ScriptGetFontProperties). | 
      | // |   | // | 
      | //      The return value indicates the presence of any missing glyphs. |   | //      The return value indicates the presence of any missing glyphs. | 
       |   |  | 
      | #define SGCM_RTL  0x00000001      // Return mirrored glyph for mirrorable Unicod
e codepoints |   | #define SGCM_RTL  0x00000001      // Return mirrored glyph for mirrorable Unicod
e codepoints | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptGetCMap( |   | __checkReturn HRESULT WINAPI ScriptGetCMap( | 
      |     HDC             hdc,            // In    Optional (see notes on caching) |   |     HDC                                     hdc,            // In    Optional (s | 
      |     SCRIPT_CACHE   *psc,            // InOut Address of Cache handle |   | ee notes on caching) | 
      |     const WCHAR    *pwcInChars,     // In    Unicode codepoint(s) to look up |   |     __deref_inout_ecount(1) SCRIPT_CACHE    *psc,           // InOut Address of  | 
      |     int             cChars,         // In    Number of characters |   | Cache handle | 
      |     DWORD           dwFlags,        // In    Flags such as SGCM_RTL |   |     __in_ecount(cChars) const WCHAR         *pwcInChars,    // In    Unicode cod | 
      |     WORD           *pwOutGlyphs);   // Out   Array of glyphs, one per input char |   | epoint(s) to look up | 
      | acter |   |     int                                     cChars,         // In    Number of c | 
       |   | haracters | 
       |   |     DWORD                                   dwFlags,        // In    Flags such  | 
       |   | as SGCM_RTL | 
       |   |     __out_ecount(cChars) WORD               *pwOutGlyphs);  // Out   Array of gl | 
       |   | yphs, one per input character | 
       |   |  | 
      | ///// |   | ///// | 
      | //  returns S_OK     - All unicode codepoints were present in the font |   | //  returns S_OK     - All unicode codepoints were present in the font | 
      | //          S_FALSE  - Some of the Unicode codepoints were mapped to the default
 glyph |   | //          S_FALSE  - Some of the Unicode codepoints were mapped to the default
 glyph | 
      | //          E_HANDLE - font or system does not support glyph indices |   | //          E_HANDLE - font or system does not support glyph indices | 
      | /////   ScriptGetGlyphABCWidth |   | /////   ScriptGetGlyphABCWidth | 
      | // |   | // | 
      | //      Returns ABC width of a given glyph. |   | //      Returns ABC width of a given glyph. | 
      | //      May be useful for drawing glyph charts. Should not be used for |   | //      May be useful for drawing glyph charts. Should not be used for | 
      | //      run of the mill complex script text formatting. |   | //      run of the mill complex script text formatting. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptGetGlyphABCWidth( |   | __checkReturn HRESULT WINAPI ScriptGetGlyphABCWidth( | 
      |     HDC             hdc,            // In    Optional (see notes on caching) |   |     HDC                                     hdc,        // In    Optional (see n | 
      |     SCRIPT_CACHE   *psc,            // InOut Address of Cache handle |   | otes on caching) | 
      |     WORD            wGlyph,         // In    Glyph |   |     __deref_inout_ecount(1) SCRIPT_CACHE    *psc,       // InOut Address of Cach | 
      |     ABC            *pABC);          // Out   ABC width |   | e handle | 
       |   |     WORD                                    wGlyph,     // In    Glyph | 
       |   |     __out_ecount(1) ABC                     *pABC);     // Out   ABC width | 
       |   |  | 
      | ///// |   | ///// | 
      | //  returns S_OK     - Glyph width returned |   | //  returns S_OK     - Glyph width returned | 
      | //          E_HANDLE - font or system does not support glyph indices |   | //          E_HANDLE - font or system does not support glyph indices | 
      | /////   SCRIPT_PROPERTIES |   | /////   SCRIPT_PROPERTIES | 
      | // |   | // | 
      | typedef struct { |   | typedef struct { | 
      |     DWORD   langid                 :16; // Primary and sublanguage associated wi
th script |   |     DWORD   langid                 :16; // Primary and sublanguage associated wi
th script | 
      |     DWORD   fNumeric               :1; |   |     DWORD   fNumeric               :1; | 
      |     DWORD   fComplex               :1;  // Script requires special shaping or la
yout |   |     DWORD   fComplex               :1;  // Script requires special shaping or la
yout | 
       |   |  | 
      | skipping to change at line 1248 |   | skipping to change at line 1246 | 
      | //p     fRejectInvalid: A script, such as Thai, where invalid sequences conventi
onally |   | //p     fRejectInvalid: A script, such as Thai, where invalid sequences conventi
onally | 
      | //          cause an editor such as notepad to beep, and ignore keypresses. |   | //          cause an editor such as notepad to beep, and ignore keypresses. | 
       |   |  | 
      | /////   ScriptGetProperties |   | /////   ScriptGetProperties | 
      | // |   | // | 
      | //      ScriptGetProperties returns the address of a table that maps a |   | //      ScriptGetProperties returns the address of a table that maps a | 
      | //      script in a SCRIPT_ANALYSIS uScript field to properties including |   | //      script in a SCRIPT_ANALYSIS uScript field to properties including | 
      | //      the primary language associated with that script, whether it's |   | //      the primary language associated with that script, whether it's | 
      | //      numeric and whether it's complex. |   | //      numeric and whether it's complex. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptGetProperties( |   | __checkReturn HRESULT WINAPI ScriptGetProperties( | 
      |     const SCRIPT_PROPERTIES ***ppSp,             // Out  Receives pointer to tab |   |     __deref_out_ecount(1) const SCRIPT_PROPERTIES   ***ppSp,        // Out  Rece | 
      | le of pointers to properties indexed by script |   | ives pointer to table of pointers to properties indexed by script | 
      |     int                       *piNumScripts);    // Out  Receives number of scri |   |     __out_ecount(1) int                             *piNumScripts); // Out  Rece | 
      | pts (valid values are 0 through NumScripts-1) |   | ives number of scripts (valid values are 0 through NumScripts-1) | 
       |   |  | 
      | /////   SCRIPT_FONTPROPERTIES |   | /////   SCRIPT_FONTPROPERTIES | 
      | // |   | // | 
      | typedef struct { |   | typedef struct { | 
      |     int     cBytes;         // Structure length |   |     int     cBytes;         // Structure length | 
      |     WORD    wgBlank;        // Blank glyph |   |     WORD    wgBlank;        // Blank glyph | 
      |     WORD    wgDefault;      // Glyph used for Unicode values not present in the 
font |   |     WORD    wgDefault;      // Glyph used for Unicode values not present in the 
font | 
      |     WORD    wgInvalid;      // Glyph used for invalid character combinations (es
pecially in Thai) |   |     WORD    wgInvalid;      // Glyph used for invalid character combinations (es
pecially in Thai) | 
      |     WORD    wgKashida;      // Shortest continuous kashida glyph in the font, -1
 if doesn't exist |   |     WORD    wgKashida;      // Shortest continuous kashida glyph in the font, -1
 if doesn't exist | 
      |     int     iKashidaWidth;  // Widths of shortest continuous kashida glyph in th
e font |   |     int     iKashidaWidth;  // Widths of shortest continuous kashida glyph in th
e font | 
      | } SCRIPT_FONTPROPERTIES; |   | } SCRIPT_FONTPROPERTIES; | 
       |   |  | 
      | /////   ScriptGetFontProperties |   | /////   ScriptGetFontProperties | 
      | // |   | // | 
      | //      Returns information from the font cache |   | //      Returns information from the font cache | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptGetFontProperties( |   | __checkReturn HRESULT WINAPI ScriptGetFontProperties( | 
      |     HDC                     hdc,    // In    Optional (see notes on caching) |   |     HDC                                     hdc,    // In    Optional (see notes | 
      |     SCRIPT_CACHE           *psc,    // InOut Address of Cache handle |   |  on caching) | 
      |     SCRIPT_FONTPROPERTIES  *sfp);   // Out   Receives properties for this font |   |     __deref_inout_ecount(1) SCRIPT_CACHE    *psc,   // InOut Address of Cache ha | 
       |   | ndle | 
       |   |     __out_ecount(1) SCRIPT_FONTPROPERTIES   *sfp);  // Out   Receives properties | 
       |   |  for this font | 
       |   |  | 
      | /////   ScriptCacheGetHeight |   | /////   ScriptCacheGetHeight | 
      | // |   | // | 
      | // |   | // | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptCacheGetHeight( |   | __checkReturn HRESULT WINAPI ScriptCacheGetHeight( | 
      |     HDC            hdc,         // In    Optional (see notes on caching) |   |     HDC                                     hdc,        // In    Optional (see n | 
      |     SCRIPT_CACHE  *psc,         // InOut Address of Cache handle |   | otes on caching) | 
      |     long          *tmHeight);   // Out   Receives font height in pixels |   |     __deref_inout_ecount(1) SCRIPT_CACHE    *psc,       // InOut Address of Cach | 
       |   | e handle | 
       |   |     __out_ecount(1) long                    *tmHeight); // Out   Receives font h | 
       |   | eight in pixels | 
       |   |  | 
      | /////   ScriptStringAnalyse |   | /////   ScriptStringAnalyse | 
      | // |   | // | 
      | // |   | // | 
      | #define SSA_PASSWORD         0x00000001  // Input string contains a single chara
cter to be duplicated iLength times |   | #define SSA_PASSWORD         0x00000001  // Input string contains a single chara
cter to be duplicated iLength times | 
      | #define SSA_TAB              0x00000002  // Expand tabs |   | #define SSA_TAB              0x00000002  // Expand tabs | 
      | #define SSA_CLIP             0x00000004  // Clip string at iReqWidth |   | #define SSA_CLIP             0x00000004  // Clip string at iReqWidth | 
      | #define SSA_FIT              0x00000008  // Justify string to iReqWidth |   | #define SSA_FIT              0x00000008  // Justify string to iReqWidth | 
      | #define SSA_DZWG             0x00000010  // Provide representation glyphs for co
ntrol characters |   | #define SSA_DZWG             0x00000010  // Provide representation glyphs for co
ntrol characters | 
      | #define SSA_FALLBACK         0x00000020  // Use fallback fonts |   | #define SSA_FALLBACK         0x00000020  // Use fallback fonts | 
       |   |  | 
      | skipping to change at line 1361 |   | skipping to change at line 1359 | 
      | //      hdc - required if SSA_GLYPH requested. Optional for SSA_BREAK. |   | //      hdc - required if SSA_GLYPH requested. Optional for SSA_BREAK. | 
      | //      If present the current font in the hdc is inspected and if a symbolic |   | //      If present the current font in the hdc is inspected and if a symbolic | 
      | //      font the character string is treated as a single neutral SCRIPT_UNDEFINE
D item. |   | //      font the character string is treated as a single neutral SCRIPT_UNDEFINE
D item. | 
      | // |   | // | 
      | //      Note that the uBidiLevel field in the initial SCRIPT_STATE value |   | //      Note that the uBidiLevel field in the initial SCRIPT_STATE value | 
      | //      is ignored - the uBidiLevel used is derived from the SSA_RTL |   | //      is ignored - the uBidiLevel used is derived from the SSA_RTL | 
      | //      flag in combination with the layout of the hdc. |   | //      flag in combination with the layout of the hdc. | 
       |   |  | 
      | typedef void* SCRIPT_STRING_ANALYSIS; |   | typedef void* SCRIPT_STRING_ANALYSIS; | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringAnalyse( |   | __checkReturn HRESULT WINAPI ScriptStringAnalyse( | 
      |     HDC                      hdc,       //In  Device context (required) |   |     HDC                                             hdc,        //In  Device con | 
      |     const void              *pString,   //In  String in 8 or 16 bit characters |   | text (required) | 
      |     int                      cString,   //In  Length in characters (Must be at l |   |     const void                                      *pString,   //In  String in  | 
      | east 1) |   | 8 or 16 bit characters | 
      |     int                      cGlyphs,   //In  Required glyph buffer size (defaul |   |     int                                             cString,    //In  Length in  | 
      | t cString*1.5 + 16) |   | characters (Must be at least 1) | 
      |     int                      iCharset,  //In  Charset if an ANSI string, -1 for  |   |     int                                             cGlyphs,    //In  Required g | 
      | a Unicode string |   | lyph buffer size (default cString*1.5 + 16) | 
      |     DWORD                    dwFlags,   //In  Analysis required |   |     int                                             iCharset,   //In  Charset if | 
      |     int                      iReqWidth, //In  Required width for fit and/or clip |   |  an ANSI string, -1 for a Unicode string | 
      |     SCRIPT_CONTROL          *psControl, //In  Analysis control (optional) |   |     DWORD                                           dwFlags,    //In  Analysis r | 
      |     SCRIPT_STATE            *psState,   //In  Analysis initial state (optional) |   | equired | 
      |     const int               *piDx,      //In  Requested logical dx array |   |     int                                             iReqWidth,  //In  Required w | 
      |     SCRIPT_TABDEF           *pTabdef,   //In  Tab positions (optional) |   | idth for fit and/or clip | 
      |     const BYTE              *pbInClass, //In  Legacy GetCharacterPlacement chara |   |     __in_ecount_opt(1) SCRIPT_CONTROL               *psControl, //In  Analysis c | 
      | cter classifications (deprecated) |   | ontrol (optional) | 
      |                                                                                  |   |     __in_ecount_opt(1) SCRIPT_STATE                 *psState,   //In  Analysis i | 
      |     SCRIPT_STRING_ANALYSIS  *pssa);     //Out Analysis of string |   | nitial state (optional) | 
       |   |     __in_ecount_opt(cString) const int              *piDx,      //In  Requested  | 
       |   | logical dx array | 
       |   |     __in_ecount_opt(1) SCRIPT_TABDEF                *pTabdef,   //In  Tab positi | 
       |   | ons (optional) | 
       |   |     const BYTE                                      *pbInClass, //In  Legacy Get | 
       |   | CharacterPlacement character classifications (deprecated) | 
       |   |     __deref_out_ecount(1) SCRIPT_STRING_ANALYSIS    *pssa);     //Out Analysis o | 
       |   | f string | 
       |   |  | 
      | /////   ScriptStringFree - free a string analysis |   | /////   ScriptStringFree - free a string analysis | 
      | // |   | // | 
      | // |   | // | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringFree( |   | __checkReturn HRESULT WINAPI ScriptStringFree( | 
      |     SCRIPT_STRING_ANALYSIS *pssa);  //InOut Address of pointer to analysis |   |     __deref_inout_ecount(1) SCRIPT_STRING_ANALYSIS  *pssa);  //InOut Address of  | 
       |   | pointer to analysis | 
       |   |  | 
      | /////   ScriptStringSize |   | /////   ScriptStringSize | 
      | // |   | // | 
      | //      returns a pointer to the size (width and height) of an analysed string |   | //      returns a pointer to the size (width and height) of an analysed string | 
      | // |   | // | 
      | //      Note that the SIZE pointer remains valid only until the |   | //      Note that the SIZE pointer remains valid only until the | 
      | //      SCRIPT_STRING_ANALYSIS is passed to ScriptStringFree. |   | //      SCRIPT_STRING_ANALYSIS is passed to ScriptStringFree. | 
       |   |  | 
      | const SIZE* WINAPI ScriptString_pSize( |   | const SIZE* WINAPI ScriptString_pSize( | 
       | 
      |     SCRIPT_STRING_ANALYSIS   ssa); |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa); | 
       |   |  | 
      | /////   ScriptString_pcOutChars |   | /////   ScriptString_pcOutChars | 
      | // |   | // | 
      | //      returns pointer to length of string after clipping (requires SSA_CLIP se
t) |   | //      returns pointer to length of string after clipping (requires SSA_CLIP se
t) | 
      | // |   | // | 
      | //      Note that the int pointer remains valid only until the |   | //      Note that the int pointer remains valid only until the | 
      | //      SCRIPT_STRING_ANALYSIS is passed to ScriptStringFree. |   | //      SCRIPT_STRING_ANALYSIS is passed to ScriptStringFree. | 
       |   |  | 
      | const int* WINAPI ScriptString_pcOutChars( |   | const int* WINAPI ScriptString_pcOutChars( | 
       | 
      |     SCRIPT_STRING_ANALYSIS   ssa); |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa); | 
       |   |  | 
      | /////   ScriptString_pLogAttr |   | /////   ScriptString_pLogAttr | 
      | // |   | // | 
      | //      returns pointer to logical attributes buffer in a SCRIPT_STRING_ANALYSIS |   | //      returns pointer to logical attributes buffer in a SCRIPT_STRING_ANALYSIS | 
      | // |   | // | 
      | //      Note that the buffer pointer remains valid only until the |   | //      Note that the buffer pointer remains valid only until the | 
      | //      SCRIPT_STRING_ANALYSIS is passed to ScriptStringFree. |   | //      SCRIPT_STRING_ANALYSIS is passed to ScriptStringFree. | 
      | // |   | // | 
      | //      The logical attribute array contains *ScriptString_pcOutChars(ssa) |   | //      The logical attribute array contains *ScriptString_pcOutChars(ssa) | 
      | //      entries. |   | //      entries. | 
       |   |  | 
      | const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr( |   | const SCRIPT_LOGATTR* WINAPI ScriptString_pLogAttr( | 
       | 
      |     SCRIPT_STRING_ANALYSIS   ssa); |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa); | 
       |   |  | 
      | /////   ScriptStringGetOrder |   | /////   ScriptStringGetOrder | 
      | // |   | // | 
      | //      Creates an array mapping original character position to glyph position. |   | //      Creates an array mapping original character position to glyph position. | 
      | // |   | // | 
      | //      Treats clusters as they were in legacy systems - Unless a cluster |   | //      Treats clusters as they were in legacy systems - Unless a cluster | 
      | //      contains more glyphs than codepoints, each glyph is referenced at |   | //      contains more glyphs than codepoints, each glyph is referenced at | 
      | //      least once from the puOrder array. |   | //      least once from the puOrder array. | 
      | // |   | // | 
      | //      Requires SSA_GLYPHS requested in original ScriptStringAnalyse call. |   | //      Requires SSA_GLYPHS requested in original ScriptStringAnalyse call. | 
      | // |   | // | 
      | //      The puOrder parameter should address a buffer containing room for |   | //      The puOrder parameter should address a buffer containing room for | 
      | //      at least *ScriptString_pcOutChars(ssa) ints. |   | //      at least *ScriptString_pcOutChars(ssa) ints. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringGetOrder( |   | __checkReturn HRESULT WINAPI ScriptStringGetOrder( | 
      |     SCRIPT_STRING_ANALYSIS  ssa, |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa, | 
      |     UINT                    *puOrder); |   |     UINT                                    *puOrder); | 
       |   |  | 
      | /////   ScriptStringCPtoX |   | /////   ScriptStringCPtoX | 
      | // |   | // | 
      | //      Return x coordinate for leading or trailing edge of character icp. |   | //      Return x coordinate for leading or trailing edge of character icp. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringCPtoX( |   | __checkReturn HRESULT WINAPI ScriptStringCPtoX( | 
      |     SCRIPT_STRING_ANALYSIS  ssa,        //In  String analysis |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa,        //In  String analysis | 
      |     int                     icp,        //In  Caret character position |   |     int                                     icp,        //In  Caret character po | 
      |     BOOL                    fTrailing,  //In  Which edge of icp |   | sition | 
      |     int                    *pX);        //Out Corresponding x offset |   |     BOOL                                    fTrailing,  //In  Which edge of icp | 
       |   |     __out_ecount(1) int                     *pX);       //Out Corresponding x of | 
       |   | fset | 
       |   |  | 
      | /////   ScriptStringXtoCP |   | /////   ScriptStringXtoCP | 
      | // |   | // | 
      | // |   | // | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringXtoCP( |   | __checkReturn HRESULT WINAPI ScriptStringXtoCP( | 
      |     SCRIPT_STRING_ANALYSIS  ssa,            // In |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa,            // In | 
      |     int                     iX,             // In |   |     int                                     iX,             // In | 
      |     int                    *piCh,           // Out |   |     __out_ecount(1) int                     *piCh,          // Out | 
      |     int                    *piTrailing);    // Out |   |     __out_ecount(1) int                     *piTrailing);   // Out | 
       |   |  | 
      | /////   ScriptStringGetLogicalWidths |   | /////   ScriptStringGetLogicalWidths | 
      | // |   | // | 
      | //      Converts visual withs in psa->piAdvance into logical widths, |   | //      Converts visual withs in psa->piAdvance into logical widths, | 
      | //      one per original character, in logical order. |   | //      one per original character, in logical order. | 
      | // |   | // | 
      | //      Requires SSA_GLYPHS requested in original ScriptStringAnalyse call. |   | //      Requires SSA_GLYPHS requested in original ScriptStringAnalyse call. | 
      | // |   | // | 
      | //      The piDx parameter should address a buffer containing room for |   | //      The piDx parameter should address a buffer containing room for | 
      | //      at least *ScriptString_pcOutChars(ssa) ints. |   | //      at least *ScriptString_pcOutChars(ssa) ints. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringGetLogicalWidths( |   | __checkReturn HRESULT WINAPI ScriptStringGetLogicalWidths( | 
      |     SCRIPT_STRING_ANALYSIS  ssa, |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa, | 
      |     int                    *piDx); |   |     int                                     *piDx); | 
       |   |  | 
      | /////   ScriptStringValidate |   | /////   ScriptStringValidate | 
      | // |   | // | 
      | //      Scans the string analysis for invalid glyphs. |   | //      Scans the string analysis for invalid glyphs. | 
      | // |   | // | 
      | //      Only glyphs generated by scripts that can generate invalid glyphs |   | //      Only glyphs generated by scripts that can generate invalid glyphs | 
      | //      are scanned. |   | //      are scanned. | 
      | // |   | // | 
      | //      returns S_OK    - no invalid glyphs are present |   | //      returns S_OK    - no invalid glyphs are present | 
      | //              S_FALSE - one or more invalid glyphs are present |   | //              S_FALSE - one or more invalid glyphs are present | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringValidate( |   | __checkReturn HRESULT WINAPI ScriptStringValidate( | 
      |     SCRIPT_STRING_ANALYSIS ssa); |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa); | 
       |   |  | 
      | /////   ScriptStringOut |   | /////   ScriptStringOut | 
      | // |   | // | 
      | //      Displays the string generated by a prior ScriptStringAnalyze call, |   | //      Displays the string generated by a prior ScriptStringAnalyze call, | 
      | //      then optionally adds highlighting corresponding to a logical selection. |   | //      then optionally adds highlighting corresponding to a logical selection. | 
      | // |   | // | 
      | //      Requires SSA_GLYPHS requested in original ScriptStringAnalyse call. |   | //      Requires SSA_GLYPHS requested in original ScriptStringAnalyse call. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptStringOut( |   | __checkReturn HRESULT WINAPI ScriptStringOut( | 
      |     SCRIPT_STRING_ANALYSIS ssa,         //In  Analysis with glyphs |   |     __in_ecount(1) SCRIPT_STRING_ANALYSIS   ssa,            //In  Analysis with  | 
      |     int              iX,                //In |   | glyphs | 
      |     int              iY,                //In |   |     int                                     iX,             //In | 
      |     UINT             uOptions,          //In  ExtTextOut options |   |     int                                     iY,             //In | 
      |     const RECT      *prc,               //In  Clipping rectangle (iff ETO_CLIPPE |   |     UINT                                    uOptions,       //In  ExtTextOut opt | 
      | D) |   | ions | 
      |     int              iMinSel,           //In  Logical selection. Set iMinSel>=iM |   |     __in_ecount_opt(1) const RECT           *prc,           //In  Clipping recta | 
      | axSel for no selection |   | ngle (iff ETO_CLIPPED) | 
      |     int              iMaxSel,           //In |   |     int                                     iMinSel,        //In  Logical select | 
      |     BOOL             fDisabled);        //In  If disabled, only the background i |   | ion. Set iMinSel>=iMaxSel for no selection | 
      | s highlighted. |   |     int                                     iMaxSel,        //In | 
       |   |     BOOL                                    fDisabled);     //In  If disabled, o | 
       |   | nly the background is highlighted. | 
       |   |  | 
      | ///// |   | ///// | 
      | //      uOptions may nclude only ETO_CLIPPED or ETO_OPAQUE. |   | //      uOptions may nclude only ETO_CLIPPED or ETO_OPAQUE. | 
      | /////   ScriptIsComplex |   | /////   ScriptIsComplex | 
      | // |   | // | 
      | //      Determines whether a Unicode string requires complex script processing |   | //      Determines whether a Unicode string requires complex script processing | 
      | // |   | // | 
      | //      The dwFlags parameter may include the following requests |   | //      The dwFlags parameter may include the following requests | 
      | // |   | // | 
      | #define SIC_COMPLEX     1   // Treat complex script letters as complex |   | #define SIC_COMPLEX     1   // Treat complex script letters as complex | 
       |   |  | 
      | skipping to change at line 1527 |   | skipping to change at line 1524 | 
      | // |   | // | 
      | //      SIC_NEUTRAL: Set this flag if you may be displaying the string with |   | //      SIC_NEUTRAL: Set this flag if you may be displaying the string with | 
      | //      right-to-left reading order. When this flag is set, neutral characters |   | //      right-to-left reading order. When this flag is set, neutral characters | 
      | //      are considered as complex. |   | //      are considered as complex. | 
      | // |   | // | 
      | // |   | // | 
      | //      Returns S_OK     if string requires complex script processing, |   | //      Returns S_OK     if string requires complex script processing, | 
      | //              S_FALSE  if string contains only characters laid out side by |   | //              S_FALSE  if string contains only characters laid out side by | 
      | //                       side from left to right. |   | //                       side from left to right. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptIsComplex( |   | __checkReturn HRESULT WINAPI ScriptIsComplex( | 
      |     const WCHAR     *pwcInChars,        //In  String to be tested |   |     __in_ecount(cInChars) const WCHAR   *pwcInChars,    //In  String to be teste | 
      |     int              cInChars,          //In  Length in characters |   | d | 
      |     DWORD            dwFlags);          //In  Flags (see above) |   |     int                                 cInChars,       //In  Length in characte | 
       |   | rs | 
       |   |     DWORD                               dwFlags);       //In  Flags (see above) | 
       |   |  | 
      | /////   ScriptRecordDigitSubstitution |   | /////   ScriptRecordDigitSubstitution | 
      | // |   | // | 
      | //      Reads NLS native digit and digit substitution settings and records |   | //      Reads NLS native digit and digit substitution settings and records | 
      | //      them in the SCRIPT_DIGITSUBSTITUTE structure. |   | //      them in the SCRIPT_DIGITSUBSTITUTE structure. | 
      | // |   | // | 
      | // |   | // | 
      | typedef struct tag_SCRIPT_DIGITSUBSTITUTE { |   | typedef struct tag_SCRIPT_DIGITSUBSTITUTE { | 
      |     DWORD  NationalDigitLanguage    :16;   // Language for native substitution |   |     DWORD  NationalDigitLanguage    :16;   // Language for native substitution | 
      |     DWORD  TraditionalDigitLanguage :16;   // Language for traditional substitut
ion |   |     DWORD  TraditionalDigitLanguage :16;   // Language for traditional substitut
ion | 
       |   |  | 
      | skipping to change at line 1568 |   | skipping to change at line 1565 | 
      | //      'Arabic') digits as their standard. NationalDigitLanguage reflects the |   | //      'Arabic') digits as their standard. NationalDigitLanguage reflects the | 
      | //      digits used as standard, and is set from |   | //      digits used as standard, and is set from | 
      | //      the NLS data for the locale. |   | //      the NLS data for the locale. | 
      | //      On Windows 2000 the national digit langauge can be |   | //      On Windows 2000 the national digit langauge can be | 
      | //      adjusted to any digit script with the control panel/regional |   | //      adjusted to any digit script with the control panel/regional | 
      | //      options/numbers/Standard digits listbox. |   | //      options/numbers/Standard digits listbox. | 
      | // |   | // | 
      | //      The TraditionalDigitLanguage for a locale is derived directly from the |   | //      The TraditionalDigitLanguage for a locale is derived directly from the | 
      | //      script used by that locale. |   | //      script used by that locale. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptRecordDigitSubstitution( |   | __checkReturn HRESULT WINAPI ScriptRecordDigitSubstitution( | 
      |     LCID                     Locale,    // In   LOCALE_USER_DEFAULT or desired l |   |     LCID                                    Locale,     // In   LOCALE_USER_DEFA | 
      | ocale |   | ULT or desired locale | 
      |     SCRIPT_DIGITSUBSTITUTE  *psds);     // Out  Digit substitution settings |   |     __out_ecount(1) SCRIPT_DIGITSUBSTITUTE  *psds);     // Out  Digit substituti | 
       |   | on settings | 
       |   |  | 
      | ///// |   | ///// | 
      | //p     Locale: NLS locale to be queried. Should usually be set to |   | //p     Locale: NLS locale to be queried. Should usually be set to | 
      | //          LOCALE_USER_DEFAULT. Alternatively may be passed as a locale |   | //          LOCALE_USER_DEFAULT. Alternatively may be passed as a locale | 
      | //          combined with LOCALE_NOUSEROVERRIDE to obtain default settings |   | //          combined with LOCALE_NOUSEROVERRIDE to obtain default settings | 
      | //          for a given locale. Note that context digit substitution is |   | //          for a given locale. Note that context digit substitution is | 
      | //          supported only in ARABIC and FARSI locales. In other locales, |   | //          supported only in ARABIC and FARSI locales. In other locales, | 
      | //          context digit is mapped to no substitution. |   | //          context digit is mapped to no substitution. | 
      | // |   | // | 
      | //p     psds: Pointer to SCRIPT_DIGITSUBSTITUTE. This structure may be passed |   | //p     psds: Pointer to SCRIPT_DIGITSUBSTITUTE. This structure may be passed | 
       |   |  | 
      | skipping to change at line 1650 |   | skipping to change at line 1647 | 
      | //          the SCRIPT_DIGIT_SUBSTITUTE structure. This field is normally |   | //          the SCRIPT_DIGIT_SUBSTITUTE structure. This field is normally | 
      | //          set to the national digits returned for the NLS LCTYPE |   | //          set to the national digits returned for the NLS LCTYPE | 
      | //          LOCALE_SNATIVEDIGITS by ScriptRecordDigitSubstitution. |   | //          LOCALE_SNATIVEDIGITS by ScriptRecordDigitSubstitution. | 
      | // |   | // | 
      | //p     SCRIPT_DIGITSUBSTITUTE_TRADITIONAL: Digits U+0030 - U+0039 will be |   | //p     SCRIPT_DIGITSUBSTITUTE_TRADITIONAL: Digits U+0030 - U+0039 will be | 
      | //          substituted according to the TraditionalDigitLangauge field of |   | //          substituted according to the TraditionalDigitLangauge field of | 
      | //          the SCRIPT_DIGIT_SUBSTITUTE structure. This field is normally |   | //          the SCRIPT_DIGIT_SUBSTITUTE structure. This field is normally | 
      | //          set to the primary language of the Locale passed to |   | //          set to the primary language of the Locale passed to | 
      | //          ScriptRecordDigitSubstitution. |   | //          ScriptRecordDigitSubstitution. | 
       |   |  | 
       | 
      | HRESULT WINAPI ScriptApplyDigitSubstitution( |   | __checkReturn HRESULT WINAPI ScriptApplyDigitSubstitution( | 
      |     const SCRIPT_DIGITSUBSTITUTE  *psds,   // In   Digit substitution settings |   |     __in_ecount(1) const SCRIPT_DIGITSUBSTITUTE *psds,  // In   Digit substituti | 
      |     SCRIPT_CONTROL                *psc,    // Out  Script control structure |   | on settings | 
      |     SCRIPT_STATE                  *pss);   // Out  Script state structure |   |     __out_ecount(1) SCRIPT_CONTROL              *psc,   // Out  Script control s | 
       |   | tructure | 
       |   |     __out_ecount(1) SCRIPT_STATE                *pss);  // Out  Script state str | 
       |   | ucture | 
       |   |  | 
      | ///// |   | ///// | 
      | //p     psds: Pointer to SCRIPT_DIGITSUBSTITUTE structure recorded earlier. |   | //p     psds: Pointer to SCRIPT_DIGITSUBSTITUTE structure recorded earlier. | 
      | //          If NULL, ScriptApplyDigitSubstitution calls |   | //          If NULL, ScriptApplyDigitSubstitution calls | 
      | //          ScriptRecordDigitSubstitution with LOCALE_USER_DEFAULT. |   | //          ScriptRecordDigitSubstitution with LOCALE_USER_DEFAULT. | 
      | // |   | // | 
      | //p     psc: SCRIPT_CONTROL structure. The fContextDigits and uDefaultLanguage |   | //p     psc: SCRIPT_CONTROL structure. The fContextDigits and uDefaultLanguage | 
      | //          fields will be updated. |   | //          fields will be updated. | 
      | // |   | // | 
      | //p     pss: SCRIPT_CONTROL structure. The fDigitSubstitute field will be |   | //p     pss: SCRIPT_CONTROL structure. The fDigitSubstitute field will be | 
      | //          updated. |   | //          updated. | 
      | // |   | // | 
      | //p     returns: E_INVALIDARG if the DigitSubstitute field of the |   | //p     returns: E_INVALIDARG if the DigitSubstitute field of the | 
      | //          SCRIPT_DIGITSUBSTITUTE structure is unrecognised, else S_OK; |   | //          SCRIPT_DIGITSUBSTITUTE structure is unrecognised, else S_OK; | 
       | 
       |   |                                                                                  | 
       |   | //****************************************************** | 
       |   | // | 
       |   | //          OpenType enabled Uniscribe APIs | 
       |   | // | 
       |   | //****************************************************** | 
       |   |  | 
       |   | #ifndef UNISCRIBE_OPENTYPE | 
       |   | #if (_WIN32_WINNT >= 0x0600) | 
       |   | #define UNISCRIBE_OPENTYPE 0x0100 | 
       |   | #endif | 
       |   | #endif | 
       |   |  | 
       |   | #if (UNISCRIBE_OPENTYPE >= 0x0100) | 
       |   |  | 
       |   | // 4-byte OpenType tag used to identify Script, LangSys or Feature | 
       |   | typedef ULONG OPENTYPE_TAG; | 
       |   |  | 
       |   | // Undefined script tag. | 
       |   | #define SCRIPT_TAG_UNKNOWN   0x00000000 | 
       |   |  | 
       |   | // Single OpenType feature | 
       |   | typedef struct opentype_feature_record{ | 
       |   |  | 
       |   |     OPENTYPE_TAG    tagFeature;     // Feature tag | 
       |   |     LONG            lParameter;     // Feature parameter (0 - disabled) | 
       |   |  | 
       |   | } OPENTYPE_FEATURE_RECORD; | 
       |   |  | 
       |   | // Set of OpenType properties applied to the range of characters | 
       |   | typedef struct textrange_properties{ | 
       |   |  | 
       |   |     OPENTYPE_FEATURE_RECORD   *potfRecords; | 
       |   |     int                        cotfRecords; | 
       |   |  | 
       |   | } TEXTRANGE_PROPERTIES; | 
       |   |  | 
       |   | // | 
       |   | // Character properties | 
       |   | // | 
       |   | // Used by shaping engines to pass shaping information between calls | 
       |   | // | 
       |   | typedef struct script_charprop{ | 
       |   |  | 
       |   |     WORD           fCanGlyphAlone : 1; | 
       |   |  | 
       |   |     WORD           reserved       : 15; // Reserved | 
       |   |  | 
       |   | } SCRIPT_CHARPROP; | 
       |   |  | 
       |   | // | 
       |   | // Glyph properties | 
       |   | // | 
       |   | typedef struct script_glyphprop{ | 
       |   |  | 
       |   |     SCRIPT_VISATTR sva; | 
       |   |     WORD           reserved; // Reserved | 
       |   |  | 
       |   | } SCRIPT_GLYPHPROP; | 
       |   |  | 
       |   | // | 
       |   | // ScriptShapeOpenType | 
       |   | // | 
       |   | // New parameters comparing to ScriptShape: | 
       |   | // | 
       |   | // tagScript            - script tag to be used by OpenType layout | 
       |   | // tagLangSys           - language system tag to be used by OpenType layout | 
       |   | // rcRangeChars         - Number of characters in each range | 
       |   | //                                          (total should be equal to cChars) | 
       |   | // | 
       |   | // rpRangeProperties     - Range properties for each range | 
       |   | // | 
       |   | // cRanges              - Number of ranges | 
       |   | // | 
       |   | // | 
       |   | // New output parameters: | 
       |   | // | 
       |   | // pCharProps           - array of character properties, generated by Uniscribe | 
       |   | // | 
       |   | // pGlyphProps          - array of glyph properties, replaces visual attributes  | 
       |   | (4 bytes now) | 
       |   | // pfCanGlyphAlone      - flag per character, indicate that char can be shaped i | 
       |   | ndependently | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptShapeOpenType( | 
       |   |     __in_opt                   HDC                     hdc,            // In     | 
       |   | Optional (see under caching) | 
       |   |     __inout                    SCRIPT_CACHE           *psc,            // InOut  | 
       |   | Cache handle | 
       |   |     __inout                    SCRIPT_ANALYSIS        *psa,            // InOut  | 
       |   | Result of ScriptItemize (may have fNoGlyphIndex set) | 
       |   |  | 
       |   |     __in                       OPENTYPE_TAG            tagScript,      // In     | 
       |   | Font script tag for shaping | 
       |   |     __in                       OPENTYPE_TAG            tagLangSys,     // In     | 
       |   | Font language system tag for shaping | 
       |   |     __in_ecount_opt(cRanges)   int                    *rcRangeChars,      // In  | 
       |   |    Array of number of characters per range | 
       |   |     __in_ecount_opt(cRanges)   TEXTRANGE_PROPERTIES  **rpRangeProperties, // In  | 
       |   |    Array of range properties (for each range) | 
       |   |     __in                       int                     cRanges,           // In  | 
       |   |    Number of ranges | 
       |   |  | 
       |   |     __in_ecount(cChars)        const WCHAR            *pwcChars,       // In     | 
       |   | Logical unicode run | 
       |   |     __in                       int                     cChars,         // In     | 
       |   | Length of unicode run | 
       |   |     __in                       int                     cMaxGlyphs,     // In     | 
       |   | Max glyphs to generate | 
       |   |  | 
       |   |     __out_ecount_full(cChars)  WORD                   *pwLogClust,     // Out    | 
       |   | Logical clusters | 
       |   |     __out_ecount_full(cChars)  SCRIPT_CHARPROP        *pCharProps,     // Out    | 
       |   | Output buffer for character properties | 
       |   |  | 
       |   |     __out_ecount_part(cMaxGlyphs, *pcGlyphs) WORD                   *pwOutGlyphs | 
       |   | ,    // Out   Output glyph buffer | 
       |   |     __out_ecount_part(cMaxGlyphs, *pcGlyphs) SCRIPT_GLYPHPROP       *pOutGlyphPr | 
       |   | ops, // Out   Visual glyph attributes | 
       |   |     __out                                    int                    *pcGlyphs);  | 
       |   |      // Out   Count of glyphs generated | 
       |   |  | 
       |   | // | 
       |   | // ScriptPlaceOpenType | 
       |   | // | 
       |   | // New parameters comparing to ScriptPlace: | 
       |   | // | 
       |   | // tagScript            - script tag to be used by OpenType layout | 
       |   | // tagLangSys           - language system tag to be used by OpenType layout | 
       |   | // rcRangeChars         - Number of characters in each range | 
       |   | //                                          (total should be equal to cChars) | 
       |   | // | 
       |   | // rpRangeProperties    - Range properties for each range | 
       |   | // | 
       |   | // cRanges              - Number of ranges | 
       |   | // | 
       |   | // | 
       |   | // New output parameters: | 
       |   | // | 
       |   | // Character information - pwcChars, pwLogClust, pCharProps are now passed to Sc | 
       |   | riptPlace | 
       |   | // pGlyphProps           - array of glyph properties, replaces visual attributes | 
       |   |  (4 bytes now) | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptPlaceOpenType( | 
       |   |     __in_opt                   HDC                     hdc,            // In     | 
       |   | Optional (see under caching) | 
       |   |     __inout                    SCRIPT_CACHE           *psc,            // InOut  | 
       |   | Cache handle | 
       |   |     __inout                    SCRIPT_ANALYSIS        *psa,            // InOut  | 
       |   | Result of ScriptItemize (may have fNoGlyphIndex set) | 
       |   |  | 
       |   |     __in                       OPENTYPE_TAG            tagScript,      // In     | 
       |   | Font script tag for shaping | 
       |   |     __in                       OPENTYPE_TAG            tagLangSys,     // In     | 
       |   | Font language system tag for shaping | 
       |   |     __in_ecount_opt(cRanges)   int                    *rcRangeChars,      // In  | 
       |   |    Array of number of characters per range | 
       |   |     __in_ecount_opt(cRanges)   TEXTRANGE_PROPERTIES  **rpRangeProperties, // In  | 
       |   |    Array of range properties (for each range) | 
       |   |     __in                       int                     cRanges,           // In  | 
       |   |    Number of ranges | 
       |   |  | 
       |   |     __in_ecount(cChars)        const WCHAR            *pwcChars,       // In     | 
       |   | Logical unicode run | 
       |   |     __in_ecount(cChars)        WORD                   *pwLogClust,     // In     | 
       |   | Logical clusters | 
       |   |     __in_ecount(cChars)        SCRIPT_CHARPROP        *pCharProps,     // In     | 
       |   | Output buffer for character properties | 
       |   |     __in                       int                     cChars,         // In     | 
       |   | Length of unicode run | 
       |   |  | 
       |   |     __in_ecount(cGlyphs)       const WORD             *pwGlyphs,       // In     | 
       |   | Glyph buffer from prior ScriptShape call | 
       |   |     __in_ecount(cGlyphs)       const SCRIPT_GLYPHPROP *pGlyphProps,    // In     | 
       |   | Glyph properties | 
       |   |     __in                       int                     cGlyphs,        // In     | 
       |   | Number of glyphs | 
       |   |  | 
       |   |     __out_ecount_full(cGlyphs) int                    *piAdvance,      // Out    | 
       |   | Advance widths | 
       |   |     __out_ecount_full(cGlyphs) GOFFSET                *pGoffset,       // Out    | 
       |   | x,y offset for combining glyph | 
       |   |     __out_opt                  ABC                    *pABC);          // Out    | 
       |   | Composite ABC for the whole run (Optional) | 
       |   |  | 
       |   | // | 
       |   | // ScriptItemizeOpenType | 
       |   | // | 
       |   | // New parameter comapring to ScriptItemize: | 
       |   | // | 
       |   | // pScriptTags -- array parallel to items, contains script tags | 
       |   | //                                              to be passed to ScriptShapeOpenT | 
       |   | ype. | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptItemizeOpenType( | 
       |   |     __in_ecount(cInChars) const WCHAR                   *pwcInChars,    // In    | 
       |   | Unicode string to be itemized | 
       |   |     __in                  int                            cInChars,      // In    | 
       |   | Codepoint count to itemize | 
       |   |     __in                  int                            cMaxItems,     // In    | 
       |   | Max length of itemization array | 
       |   |     __in_opt              const SCRIPT_CONTROL          *psControl,     // In    | 
       |   | Analysis control (optional) | 
       |   |     __in_opt              const SCRIPT_STATE            *psState,       // In    | 
       |   | Initial bidi algorithm state (optional) | 
       |   |     __out_ecount_part(cMaxItems, *pcItems) SCRIPT_ITEM  *pItems,        // Out   | 
       |   | Array to receive itemization | 
       |   |     __out_ecount_part(cMaxItems, *pcItems) OPENTYPE_TAG *pScriptTags,   // Out   | 
       |   | Array of script tags - parallel to items | 
       |   |     __out                 int                           *pcItems);      // Out   | 
       |   | Count of items processed (optional) | 
       |   |  | 
       |   | // ScriptGetFontScriptList | 
       |   | // | 
       |   | // Returns list of script tags supported by layout tables. | 
       |   | // Only scripts that can be shaped by eScript will be returned ( or full list if | 
       |   |  psa==NULL). | 
       |   | // Usually complex scripts return single tag and neutral (like digits) return al | 
       |   | l tags from the font | 
       |   | // | 
       |   | // Note: If tag coresponding to some script is present it does not guarantee | 
       |   | //       that font won't be rejected by particular shaping engine because | 
       |   | //       shaping engine may require particular language system or feature | 
       |   | //       to be present. | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptGetFontScriptTags( | 
       |   |     __in_opt           HDC                              hdc,             // In   | 
       |   |   Optional (see under caching) | 
       |   |     __inout            SCRIPT_CACHE                    *psc,             // InOu | 
       |   | t Cache handle | 
       |   |     __in_opt           SCRIPT_ANALYSIS                 *psa,             // In   | 
       |   |   Result of ScriptItemize (can be NULL) | 
       |   |     __in               int                              cMaxTags,        // In   | 
       |   |   Length of pScriptTags array | 
       |   |     __out_ecount_part(cMaxTags, *pcTags) OPENTYPE_TAG  *pScriptTags,     // Out: | 
       |   |   list of script tags in the font | 
       |   |     __out              int                             *pcTags           // Out: | 
       |   |   Number of tags returned | 
       |   | ); | 
       |   |  | 
       |   | // | 
       |   | // ScriptGetFontLanguageTags | 
       |   | // | 
       |   | // Returns list of language system tags supported by layout tables for particula | 
       |   | r script. | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptGetFontLanguageTags( | 
       |   |     __in_opt           HDC                    hdc,             // In    Optional | 
       |   |  (see under caching) | 
       |   |     __inout            SCRIPT_CACHE          *psc,             // InOut Cache ha | 
       |   | ndle | 
       |   |     __in_opt           SCRIPT_ANALYSIS       *psa,             // In    Result o | 
       |   | f ScriptItemize  (can be NULL) | 
       |   |     __in               OPENTYPE_TAG           tagScript,       // In    Font scr | 
       |   | ipt tag | 
       |   |  | 
       |   |     __in               int                    cMaxTags,        // In    Length o | 
       |   | f pLangsys tags array | 
       |   |     __out_ecount_part(cMaxTags, *pcTags) OPENTYPE_TAG *pLangsysTags,    // Out:  | 
       |   |  list of Langsys tags in the font | 
       |   |     __out              int                   *pcTags           // Out:  Number o | 
       |   | f tags returned | 
       |   | ); | 
       |   |  | 
       |   | // | 
       |   | // ScriptGetFontFeatureTags | 
       |   | // | 
       |   | // Returns list of feature tags supported by layout tables for particular langua | 
       |   | ge system. | 
       |   | // | 
       |   | // This method will hide features that are language specific, because they are | 
       |   | // controlled by shaping engines and can not be switched on or off by the client | 
       |   | . | 
       |   | // Example of such features are initial, medial and final forms for Arabic scrip | 
       |   | t | 
       |   | // | 
       |   | // If psa==NULL function returns unfiltered feature list | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptGetFontFeatureTags( | 
       |   |     __in_opt           HDC                    hdc,             // In    Optional | 
       |   |  (see under caching) | 
       |   |     __inout            SCRIPT_CACHE          *psc,             // InOut Cache ha | 
       |   | ndle | 
       |   |     __in_opt           SCRIPT_ANALYSIS       *psa,             // In    Result o | 
       |   | f ScriptItemize  (can be NULL) | 
       |   |     __in               OPENTYPE_TAG           tagScript,       // In    Font scr | 
       |   | ipt tag | 
       |   |     __in               OPENTYPE_TAG           tagLangSys,      // In    Font lan | 
       |   | guage system tag for shaping | 
       |   |  | 
       |   |     __in               int                    cMaxTags,        // In    Length o | 
       |   | f pLangsys tags array | 
       |   |     __out_ecount_part(cMaxTags, *pcTags) OPENTYPE_TAG *pFeatureTags,   // Out:   | 
       |   | list of feature tags in the font | 
       |   |     __out              int                   *pcTags           // Out:  Number o | 
       |   | f tags returned | 
       |   | ); | 
       |   |  | 
       |   | // | 
       |   | //  ScriptGetFontAlternateGlyphs | 
       |   | // | 
       |   | //  Returns list alternates for particular glyph. | 
       |   | // | 
       |   | //  Original glyph is always added as a first element. Index in this array | 
       |   | //  is exactly the feature parameter that should be passed to ScriptShape. | 
       |   | // | 
       |   | //  To get variants it is a good idea to reshape input without feature | 
       |   | //  applied to current glyph so it will be always alternates for default | 
       |   | //  glyph for this position. Original glyph could have variants, while | 
       |   | //  variants may not. So UI will stick with this final form wihtout ability | 
       |   | //  to choose another one. | 
       |   | // | 
       |   | //  Note: It theoretically can be emulated by ScriptSubstituteSingleGlyph. | 
       |   | //        Just try parameters one by one while glyphs are substituted. | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptGetFontAlternateGlyphs( | 
       |   |     __in_opt           HDC                    hdc,             // In    Optional | 
       |   |  (see under caching) | 
       |   |     __inout            SCRIPT_CACHE          *psc,             // InOut Cache ha | 
       |   | ndle | 
       |   |     __in_opt           SCRIPT_ANALYSIS       *psa,             // In    Result o | 
       |   | f ScriptItemize  (can be NULL) | 
       |   |     __in               OPENTYPE_TAG           tagScript,       // In    Font scr | 
       |   | ipt tag | 
       |   |     __in               OPENTYPE_TAG           tagLangSys,      // In    Font lan | 
       |   | guage system tag for shaping | 
       |   |     __in               OPENTYPE_TAG           tagFeature,      // In    Feature  | 
       |   | tag to test for alternates | 
       |   |  | 
       |   |     __in               WORD                   wGlyphId,        // In    Original | 
       |   |  glyph | 
       |   |  | 
       |   |     __in               int                    cMaxAlternates,  // In    Length o | 
       |   | f pAlternateGlyphs tags array | 
       |   |     __out_ecount_part(cMaxAlternates, *pcAlternates) WORD *pAlternateGlyphs, //  | 
       |   | Out:  list of feature tags in the font | 
       |   |     __out              int                   *pcAlternates     // Out:  Number o | 
       |   | f alternates returned | 
       |   | ); | 
       |   |  | 
       |   | // | 
       |   | //  ScriptSubstituteSingleGlyph | 
       |   | // | 
       |   | //  Apply partcular feature to single glyph, assuming that | 
       |   | //  expected result is one-to-one substitution | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptSubstituteSingleGlyph( | 
       |   |     __in_opt           HDC                    hdc,             // In    Optional | 
       |   |  (see under caching) | 
       |   |     __inout            SCRIPT_CACHE          *psc,             // InOut Cache ha | 
       |   | ndle | 
       |   |     __in_opt           SCRIPT_ANALYSIS       *psa,             // In    Result o | 
       |   | f ScriptItemize  (can be NULL) | 
       |   |     __in               OPENTYPE_TAG           tagScript,       // In    Font scr | 
       |   | ipt tag | 
       |   |     __in               OPENTYPE_TAG           tagLangSys,      // In    Font lan | 
       |   | guage system tag for shaping | 
       |   |     __in               OPENTYPE_TAG           tagFeature,      // In    Feature  | 
       |   | tag to test for alternates | 
       |   |     __in               LONG                   lParameter,      // In    Feature  | 
       |   | parameter | 
       |   |  | 
       |   |     __in               WORD                   wGlyphId,         // In    Origina | 
       |   | l glyph id | 
       |   |     __out              WORD                  *pwOutGlyphId      // Out   Substit | 
       |   | uted glyph id | 
       |   | ); | 
       |   |  | 
       |   | // | 
       |   | //  ScriptPositionSingleGlyph | 
       |   | // | 
       |   | //  Apply particular feature to single glyph, assuming that | 
       |   | //  expected result is single position adjustment. | 
       |   | // | 
       |   | __checkReturn HRESULT WINAPI ScriptPositionSingleGlyph( | 
       |   |     __in_opt           HDC                    hdc,             // In    Optional | 
       |   |  (see under caching) | 
       |   |     __inout            SCRIPT_CACHE          *psc,             // InOut Cache ha | 
       |   | ndle | 
       |   |     __in_opt           SCRIPT_ANALYSIS       *psa,             // In    Result o | 
       |   | f ScriptItemize  (can be NULL) | 
       |   |     __in               OPENTYPE_TAG           tagScript,       // In    Font scr | 
       |   | ipt tag | 
       |   |     __in               OPENTYPE_TAG           tagLangSys,      // In    Font lan | 
       |   | guage system tag for shaping | 
       |   |     __in               OPENTYPE_TAG           tagFeature,      // In    Feature  | 
       |   | tag to test for alternates | 
       |   |     __in               LONG                   lParameter,      // In    Feature  | 
       |   | parameter | 
       |   |  | 
       |   |     __in               WORD                   wGlyphId,         // In    Glyph i | 
       |   | d to be moved | 
       |   |     __in               int                    iAdvance,         // In    Origina | 
       |   | l glyph advance width | 
       |   |     __in               GOFFSET                GOffset,          // In    Origina | 
       |   | l glyph offset | 
       |   |  | 
       |   |     __out              int                   *piOutAdvance,     // Out   Adjuste | 
       |   | d advance width | 
       |   |     __out              GOFFSET               *pOutGoffset       // Out   Adjuste | 
       |   | d offset | 
       |   | ); | 
       |   |  | 
       |   | #endif // (UNISCRIBE_OPENTYPE >= 0x0100) | 
       |   |                                                                                  | 
      | #ifdef __cplusplus |   | #ifdef __cplusplus | 
      | } |   | } | 
      | #endif |   | #endif | 
      | #endif |   | #endif | 
      |   |  | 
     |  End of changes. 36 change blocks.  | 
     | 237 lines changed or deleted |   | 723 lines changed or added | 
      |