Compartilhar via


ScriptBreak (Windows CE 5.0)

Send Feedback

This function returns information for determining line breaks.

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.
  • psa
    [in] Pointer to the SCRIPT_ANALYSIS structure obtained from an earlier call to the ScriptItemize function.
  • psla
    [out] Pointer to a buffer that receives the character attributes as a SCRIPT_LOGATTR structure.

Return Values

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

OS Versions: Windows CE 5.0 and later.
Header: Usp10.h.
Link Library: Uspce.lib.

See Also

ScriptItemize | ScriptShape | SCRIPT_ANALYSIS | SCRIPT_LOGATTR | SCRIPT_PROPERTIES

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.