ScriptApplyLogicalWidth (Windows CE 5.0)

Send Feedback

This function takes an array of advance widths for a run and generates an array of glyph widths that are suitable for passing to the piJustify parameter of ScriptTextOut.

HESULT WINAPI ScriptApplyLogicalWidth(  const int* piDx,  int cChars,  int cGlyphs,  const WORD* pwLogClust,  const SCRIPT_VISATTR* psva,  const int* piAdvance,  const SCRIPT_ANALYSIS* psa,  ABC* pABC,  int* piJustify,);

Parameters

  • piDx
    [in] Pointer to an array of dx widths in logical order, one per code point.
  • cChars
    [in] Count of the logical code points in the run.
  • cGlyphs
    [in] Glyph count.
  • pwLogClust
    [in] Pointer to an array of logical clusters from ScriptShape.
  • psva
    [in] Pointer to a SCRIPT_VISATTR structure from ScriptShape and updated by ScriptPlace.
  • piAdvance
    [in] Pointer to an array of glyph advance widths from ScriptPlace.
  • psa
    [in] Pointer to a SCRIPT_ANALYSIS structure from ScriptItemize and updated by ScriptShape and ScriptPlace.
  • pABC
    [in, out] Pointer to the overall ABC width of a run. It is optional. If present, when the function is called, it should contain the run ABC widths returned by ScriptPlace; when the function returns, the ABC width has been updated to match the new widths.
  • piJustify
    [out] Pointer to an array that receives the resulting glyph advance widths. This is suitable for passing to the piJustify parameter of ScriptTextOut.

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

ScriptApplyLogicalWidth may be used to reapply logical widths obtained with ScriptGetLogicalWidths. It may be useful in situations such as metafiling, where it is necessary to record and reapply advance width information in a font-independent manner, independent of glyph substitutions such as ligaturisation.

Requirements

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

See Also

ScriptGetLogicalWidths | ScriptItemize | ScriptPlace | ScriptShape | ScriptTextOut | SCRIPT_ANALYSIS | SCRIPT_VISATTR

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.