다음을 통해 공유


ScriptGetLogicalWidths (Windows CE 5.0)

Send Feedback

This function converts the glyph advance widths for a specific font into logical widths.

HRESULT WINAPI ScriptGetLogicalWidths(  const SCRIPT_ANALYSIS *psa,  int cChars,  int cGlyphs,  const int* piGlyphWidth,  const WORD* pwLogClust,  const SCRIPT_VISATTR* psva,  int* piDx,);

Parameters

  • psa
    [in] Pointer to a SCRIPT_ANALYSIS structure.
  • cChars
    [in] Count of the logical code points in the run.
  • cGlyphs
    [in] Count of the glyphs in a run.
  • piGlyphWidth
    [in] Pointer to an array of glyph advance widths.
  • pwLogClust
    [in] Pointer to an array of logical clusters.
  • psva
    [in] Pointer to a SCRIPT_VISATTR structure.
  • piDx
    [out] Pointer to an array of logical widths.

Return Values

Currently, ScriptGetLogicalWidths always returns S_OK.

Remarks

ScriptGetLogicalWidths is useful for recording widths in a font-independent manner. ScriptGetLogicalWidths converts the glyph advance widths calculated for a specific font into logical widths, one per code point, in the same order as the code points. If the same string is then displayed on a different device using a different font, the logical widths may be applied, by using ScriptApplyLogicalWidth, to approximate the original placement. This would be useful when implementing print preview on the preview screen it is important to match the layout and placement of the final printed result.

Ligature glyph widths are divided evenly among the characters they represent.

Requirements

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

See Also

ScriptApplyLogicalWidth | SCRIPT_VISATTR

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.