Platform SDK: International Features |
Uniscribe uses multiple shaping engines that contain the layout knowledge for particular scripts. It also takes advantage of the Microsoft® OpenType® layout shaping engine for handling font-specific script features such as glyph generation, extent measurement, and word-breaking support. Uniscribe manages bidirectional character reordering using the Unicode bidirectional algorithm, and understands non-OpenType layout font formats for Arabic, Hebrew, and Thai shaping.
The exact codepoint ranges assigned to each shaping engine may vary, so with the exception of SCRIPT_ UNDEFINED, script numbers are not published. In spite of this, you can test the attributes of scripts by calling the ScriptGetProperties function, which accesses the global script properties table. Applications may use the global script properties to help combine their own layout rules with the required shaping engine divisions.
All the complex script shaping engines, the digit shaping engines, the punctuation and the ASCII shaping engines validate the font in the hdc before shaping, and will return USP_E_SCRIPT_NOT_IN_FONT if the font does not contain sufficient glyphs or shaping tables. Only scripts that have the property fComplex should be shaped with the script returned by the ScriptItemize function. All other runs may be merged and shaped with SCRIPT_UNDEFINED specified in the SCRIPT_ANALYSIS structure. If there are characters not supported by the font, SCRIPT_UNDEFINED will not fail with USP_E_SCRIPT_ NOT_IN_FONT. Instead, missing glyphs will usually be displayed as an empty rectangle. An application can determine if a codepoint is supported by a font by calling the ScriptGetFontProperties function to obtain the default glyph index, and the ScriptGetCMap function to look up font glyphs for Unicode code points.