Share via


ScriptApplyLogicalWidth (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

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.
  • piAdvance
    [in] Pointer to an array of glyph advance widths from 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 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

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

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

See Also

Reference

ScriptGetLogicalWidths
ScriptItemize
ScriptPlace
ScriptShape
ScriptTextOut
SCRIPT_ANALYSIS
SCRIPT_VISATTR

Other Resources

Uniscribe Functions