Partager via


IXRGlyphs::SetIndices (Windows Embedded CE 6.0)

1/6/2010

This method sets the glyph indices for the glyphs.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetIndices(
    WCHAR* Indices
) = 0; 

Parameters

  • Indices
    [in] Pointer to a string that contains new information to define glyph indices, and also other glyph specifics, which are described by using a specific format.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The Indices value is a semi-colon-delimited series of glyph indices and their attributes used for rendering the glyph.

The format of glyph indices is complex and is not documented completely here. For more information about the format of glyph indices, see this Microsoft Web site.

The following is an approximate grammar of one index point:

[GlyphIndex][,[Advance][,[uOffset][,[vOffset]]]]

Each such index point is then separated in the string by a semicolon (;).

The following table describes the elements in the previous code example:

Term Underlying type Definition

GlyphIndex

Integer

Index of a glyph in the font.

Advance

Double

Placement for next glyph in relation to the origin of this glyph.

uOffset, vOffset

Double

Offset in relation to glyph origin to move this glyph. Usually used to attach marks to base characters.

As an example, you can use glyph indices for spacing the characters within the Unicode string specified in IXRGlyphs::SetUnicodeString, instead of for providing the full specification of each glyph. In this case, you would always use the Unicode string for the true indices and leave GlyphIndex blank in each index point. For example, to apply an advance spacing of 80 for each character in the Unicode string "Hello", you would set the value of Indices to ",80;,80;,80;,80;,80;".

.NET Framework Equivalent

System.Windows.Documents.Glyphs.Indices

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRGlyphs
IXRGlyphs::SetIndices