Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
3/28/2014
This function enables substitution of a single glyph with one alternate form of the same glyph for OpenType processing. Most often, applications use this function to set a bullet or an alternate glyph at the beginning or end of a line.
Syntax
HRESULT ScriptSubstituteSingleGlyph(
HDC hdc,
SCRIPT_CACHE* psc,
SCRIPT_ANALYSIS* psa,
OPENTYPE_TAG tagScript,
OPENTYPE_TAG tagLangSys,
OPENTYPE_TAG tagFeature,
LONG lParameter,
WORD wGlyphId,
WORD* pwOutGlyphId
);
Parameters
- hdc
[in] Optional. Handle to the device context.
- psc
[in/out] Pointer to a SCRIPT_CACHE structure indicating the script cache.
psa
[in] 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 supply a null pointer 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
[out] Identifier of the original glyph.
- pwOutGlyphId
[out] Pointer to the location in which this function retrieves the identifier of the alternate glyph.
Return Values
If the function is successful, it returns 0. If it does not succeed, it returns a nonzero HRESULT value. 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.
Requirements
Header |
usp10.h |
Library |
Uspce.lib |
See Also
Reference
Uniscribe Functions
SCRIPT_CACHE
SCRIPT_ANALYSIS
OPENTYPE_TAG
ScriptGetFontAlternateGlyphs