Export (0) Print
Expand All

ScriptSubstituteSingleGlyph function

Enables substitution of a single glyph with one alternate form of the same glyph for OpenType processing.

Syntax


HRESULT ScriptSubstituteSingleGlyph(
  _In_opt_  HDC hdc,
  _Inout_   SCRIPT_CACHE *psc,
  _In_opt_  SCRIPT_ANALYSIS *psa,
  _In_      OPENTYPE_TAG tagScript,
  _In_      OPENTYPE_TAG tagLangSys,
  _In_      OPENTYPE_TAG tagFeature,
  _In_      LONG lParameter,
  _In_      WORD wGlyphId,
  _Out_     WORD *pwOutGlyphId
);

Parameters

hdc [in, optional]

Handle to the device context. For more information, see Caching.

psc [in, out]

Pointer to a SCRIPT_CACHE structure indicating the script cache.

psa [in, optional]

Pointer to a SCRIPT_ANALYSIS structure obtained from a previous call to ScriptItemizeOpenType. This parameter identifies the shaping engine so that the correct substitute glyph is used.

Alternatively, the application can set this parameter to NULL to retrieve unfiltered results.

tagScript [in]

An OPENTYPE_TAG structure defining the script tag for shaping.

tagLangSys [in]

An OPENTYPE_TAG structure defining the language tag for shaping.

tagFeature [in]

An OPENTYPE_TAG structure defining the feature tag to use for shaping the alternate glyph.

lParameter [in]

Reference to the alternate glyph to substitute. This reference is an index to an array that contains all the alternate glyphs defined in the feature, as illustrated for OPENTYPE_FEATURE_RECORD. The alternate glyph array is one of the items retrieved by ScriptGetFontAlternateGlyphs.

wGlyphId [in]

Identifier of the original glyph.

pwOutGlyphId [out]

Pointer to the location in which this function retrieves the identifier of the alternate glyph.

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 uses one-to-one substitution in which the application can substitute one glyph with one alternate form. Most often, applications use this function to set a bullet or an alternate glyph at the beginning or end of a line.

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 Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Redistributable

Usp10.dll version 1.600 or greater on Windows XP

Header

Usp10.h

Library

Usp10.lib

DLL

Usp10.dll

See also

Uniscribe
Uniscribe Functions
Caching
ScriptGetFontAlternateGlyphs
ScriptItemizeOpenType
OPENTYPE_TAG
SCRIPT_ANALYSIS
SCRIPT_CACHE

 

 

Community Additions

ADD
Show:
© 2014 Microsoft