Platform SDK: International Features |
The ScriptApplyLogicalWidth 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, );
If the function succeeds, the return value is zero.
If the function fails, it returns a nonzero value. And if any other unrecoverable error is encountered, it is also returned as HRESULT. For example, error returns from Win32 API functions are converted to HRESULT using the HRESULT_FROM_WIN32 macro and returned to the client in the HRESULT.
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.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Usp10.h.
Library: Use Usp10.lib.
Uniscribe Overview, Uniscribe Functions, ScriptGetLogicalWidths, ScriptItemize, ScriptPlace, ScriptShape, ScriptTextOut, SCRIPT_ANALYSIS, SCRIPT_VISATTR