Freigeben über


Indices

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the glyph indices that represent the Glyphs object.

<object Indices="string"  .../>
value = object.Indices
object.Indices = value

Property Value

Type: string

A value that defines glyph indices as well as other glyph specifics in a string mini-language.

This property is read/write. The default value is null.

Indices Grammar

The format for glyph indices is complex and is not documented completely here. 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 (;).

Term

Underlying type

Definition

GlyphIndex

integer

Index of a glyph in the font.

Advance

double

Placement for next glyph relative to origin of this glyph.

uOffset, vOffset

double

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

Managed Equivalent

Indices

Remarks

In Silverlight, the most relevant purpose for the Indices property is for spacing the characters within the specified Unicode string, instead of fully specifying 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", the Indices value would be ",80;,80;,80;,80;,80;".

For more information, see Introduction to the GlyphRun Object and Glyphs Element. This topic discusses glyphs within the Windows Presentation Foundation (WPF) framework, but the description of the indices format is applicable to glyphs in Silverlight as well.

Applies To

Glyphs

See Also

Reference