Export (0) Print
Expand All

Using the ScriptString Functions

For an application dealing with unformatted 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. These 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.

FunctionDescription
ScriptStringAnalyse

Analyzes plain text. This function corresponds to the following functions:

ScriptItemize
ScriptShape
ScriptPlace
ScriptBreak
ScriptGetCMap
ScriptJustify
ScriptLayout
ScriptStringCPtoX Retrieves the x coordinate for a character position. This function corresponds to ScriptCPtoX.
ScriptStringFree Frees a SCRIPT_STRING_ANALYSIS structure.
ScriptStringGetLogicalWidths Converts visual widths to logical widths. This function corresponds to ScriptGetLogicalWidths.
ScriptStringGetOrder Maps character glyph positions in a similar way to GetCharacterPlacement, for legacy use only. This function does not work well with scripts that generate more than one glyph per code point.
ScriptStringOut Displays plain text. This function 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 code point sequences not valid in the given script. This function is different from ScriptGetCMap, which identifies code points not present in a font.
ScriptStringXtoCP Converts an x coordinate to a character position. This function corresponds to ScriptXtoCP.

 

To only display plain text without any modifications, an application should call ScriptStringAnalyse, ScriptStringOut, and then ScriptStringFree. The other functions are used to modify the plain text before display.

Related topics

Using Uniscribe

 

 

Community Additions

ADD
Show:
© 2014 Microsoft