Important: The information in this document is obsolete and should not be used for new development.
FindScriptRun
TheFindScriptRunfunction finds the next block of subscript text within a script run.
FUNCTION FindScriptRun (textPtr: Ptr; textLen: LongInt; VAR lenUsed: LongInt): ScriptRunStatus;
textPtr- A pointer to the text string to be analyzed.
textLen- The number of bytes in the text string.
lenUsed- On output, contains the length, in bytes, of the script run that begins with the first character in the string; this length is always greater than or equal to 1, unless the string passed in is of length 0.
DESCRIPTION
TheFindScriptRunfunction is used to identify blocks of subscript text in a string. Some script systems include subscripts, which are character sets that are subsidiary to the main character set. One useful subscript is the set of all character codes that have the same meaning in Roman as they do in a non-Roman script. For other scripts such as Japanese, there are additional useful subscripts. For example, a Japanese script system might include some Hiragana characters that are useful for input methods.
FindScriptRuncomputes the length of the current run of subscript text in the text string specified bytextPtrandtextLen. It assigns the length, in bytes, to thelenUsedparameter and returns a status code. You can advance the text pointer by the value oflenUsedto make subsequent calls to this function. You can use this function to identify runs of subscript characters so that you can treat them separately.The function result identifies the run as either native text, Roman, or one of the defined subscripts of the script system and returns a record of type
ScriptRunStatus. This record is described in the section "The Script Run Status Record" on page 5-46.Word processors and other applications can call
FindScriptRunto separate style runs of native text from non-native text. You can use this capability to extract those characters and apply a different font to them. Figure 5-11 on page 5-28 provides an example of using theFindScriptRunroutine.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theFindScriptRunfunction are
Trap macro Selector _ScriptUtil $820C 0026