Platform SDK: International Features |
The ScriptGetLogicalWidths 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, );
Currently, ScriptGetLogicalWidths always returns S_OK.
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.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Usp10.h.
Library: Use Usp10.lib.
Uniscribe Overview, Uniscribe Functions, ScriptApplyLogicalWidth, SCRIPT_ANALYSIS, SCRIPT_VISATTR