Share via


ScriptBreak (Windows Embedded CE 6.0)

1/6/2010

This function returns information for determining line breaks.

Syntax

HRESULT WINAPI ScriptBreak( 
  const WCHAR* pwcChars, 
  int cChars, 
  const SCRIPT_ANALYSIS* psa, 
  SCRIPT_LOGATTR* psla 
);

Parameters

  • pwcChars
    [in] Unicode characters to be processed.
  • cChars
    [in] Number of Unicode characters to be processed.
  • psla
    [out] Pointer to a buffer that receives the character attributes as a SCRIPT_LOGATTR structure.

Return Value

If the function succeeds, the return value is zero.

If the function fails, it returns a nonzero value. If any other unrecoverable error is encountered, it is returned as an HRESULT.

Remarks

The ScriptBreak function returns cursor movement and formatting break positions for an item in an array of SCRIPT_LOGATTR structures. To support mixed formatting within a single word correctly, ScriptBreak should be passed whole items as returned by ScriptItemize and not the finer formatting runs.

ScriptBreak does not require an hdc and does not perform shaping.

The SCRIPT_LOGATTR structure, pointed to by psla, identifies valid caret positions and line breaks. The SCRIPT_LOGATTR.fCharStop flag marks cluster boundaries for those scripts where it is conventional to restrict from moving inside clusters. The same boundaries could also be inferred by inspecting the pwLogCLust array returned by ScriptShape, however ScriptBreak is considerably faster in implementation and does not require an hdc to be prepared. The fWordStop, fSoftBreak, and fWhiteSpace members in SCRIPT_LOGATTR are only available through ScriptBreak.

Most shaping engines that identify invalid sequences do so by setting the fInvalid member in ScriptBreak. The fInvalidLogAttr member in SCRIPT_PROPERTIES identifies which scripts do this.

Requirements

Header usp10.h
Library Uspce.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

ScriptItemize
ScriptShape
SCRIPT_ANALYSIS
SCRIPT_LOGATTR
SCRIPT_PROPERTIES

Other Resources

Uniscribe Functions