Поделиться через


ScriptGetLogicalWidths (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

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.
  • piDx
    [out] Pointer to an array of logical widths.

Return Value

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

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

See Also

Reference

ScriptApplyLogicalWidth
SCRIPT_VISATTR

Other Resources

Uniscribe Functions