Platform SDK: International Features |
For an application dealing with plain text, Uniscribe provides the ScriptString functions. These functions are similar to ExtTextOut, DrawText, and GetTextExtent, but they provide full complex script support including caret placement. The ScriptString functions are similar to the other Uniscribe functions, but are tailored to the simpler requirements of plain text processing.
The following table details the ScriptString functions and any counterparts in the other Uniscribe functions.
Function | Description |
---|---|
ScriptStringAnalyse | Analyses plain text. It corresponds to the following functions: ScriptItemize ScriptShape ScriptPlace ScriptBreak ScriptGetCMap ScriptJustify ScriptLayout |
ScriptStringCPtoX | Returns the x coordinate for a character position. It corresponds to ScriptCPtoX. |
ScriptStringFree | Frees a SCRIPT_STRING_ANALYSIS structure. |
ScriptStringGetLogicalWidths | Converts visual widths to logical widths. It corresponds to ScriptGetLogicalWidths. |
ScriptStringGetOrder | Maps character glyph positions in a similar way to GetCharacterPlacement, for legacy use only. Does not work well with scripts that generate more than one glyph ser codepoint. |
ScriptStringOut | Displays plain text. It corresponds to ScriptTextOut. |
ScriptString_pcOutChars | Returns a pointer to the length of a clipped plain text string. |
ScriptString_pLogAttr | Returns a pointer to the logical attributes buffer for an analyzed plain text string. |
ScriptString_pSize | Returns a pointer to the size (width and height) for an analyzed plain text string. |
ScriptStringValidate | Identifies codepoint sequences not valid in the given script. This is different from ScriptGetCMap, which identifies code points not present in a font. |
ScriptStringXtoCP | Converts an x coordinate to a character position. It corresponds to ScriptXtoCP. |
To simply display plain text without any modifications, call ScriptStringAnalyse, ScriptStringOut, and then ScriptStringFree. The other functions are used to modify the plain text before display.