Export (0) Print
Expand All

ScriptApplyLogicalWidth function

Takes an array of advance widths for a run and generates an array of adjusted advance glyph widths.

Syntax


HRESULT ScriptApplyLogicalWidth(
  _In_        const int             *piDx,
  _In_              int             cChars,
  _In_              int             cGlyphs,
  _In_        const WORD            *pwLogClust,
  _In_        const SCRIPT_VISATTR  *psva,
  _In_        const int             *piAdvance,
  _In_        const SCRIPT_ANALYSIS *psa,
  _Inout_opt_       ABC             *pABC,
  _Out_             int             *piJustify
);

Parameters

piDx [in]

Pointer to an array of advance 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.

psva [in]

Pointer to a SCRIPT_VISATTR structure from ScriptShape and updated by ScriptPlace.

piAdvance [in]

Pointer to an array of glyph advance widths from ScriptPlace.

psa [in]

Pointer to a SCRIPT_ANALYSIS structure from ScriptItemize and updated by ScriptShape and ScriptPlace.

pABC [in, out, optional]

Pointer to the overall ABC width of a run. On input, the parameter should contain the run ABC widths retrieved by ScriptPlace. On output, the parameter indicates the ABC width updated to match the new widths.

piJustify [out]

Pointer to an array in which the function retrieves the glyph advance widths. This array is suitable for passing to the piJustify parameter of ScriptTextOut.

Return value

Returns 0 if successful. The function returns a nonzero HRESULT value if it does not succeed. The application can test the return value with the SUCCEEDED and FAILED macros.

Remarks

This function can be used to reapply logical widths obtained with ScriptGetLogicalWidths. It can be useful in situations such as metafiling, for which advance width information must be recorded and reapplied in a font-independent manner, independent of glyph substitutions, such as ligaturization.

Important  Starting with Windows 8: To maintain the ability to run on Windows 7, a module that uses Uniscribe must specify Usp10.lib before gdi32.lib in its library list.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Redistributable

Internet Explorer 5 or later on Windows Me/98/95

Header

Usp10.h

Library

Usp10.lib

DLL

Usp10.dll

See also

Uniscribe
Uniscribe Functions
ScriptGetLogicalWidths
ScriptItemize
ScriptPlace
ScriptShape
ScriptTextOut
SCRIPT_ANALYSIS
SCRIPT_VISATTR

 

 

Community Additions

ADD
Show:
© 2015 Microsoft