Compartir a través de


Glyphs.Indices Property

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

Gets or sets the glyph indices for the glyphs.

Namespace:  System.Windows.Documents
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Property Indices As String
public string Indices { get; set; }
<Glyphs Indices="string"/>

Property Value

Type: System.String
A string that defines glyph indices as well as other glyph specifics in a string mini-language. The default is nulla null reference (Nothing in Visual Basic).

Remarks

Dependency property identifier field: IndicesProperty

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.

The most relevant purpose for the Indices property in Silverlight is to use it for spacing the characters within the specified Unicode string, rather than for 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", the Indices value would be ",80;,80;,80;,80;,80;".

For more information see this document in the Windows Presentation Foundation (WPF) area of the .NET SDK: Introduction to the GlyphRun Object and Glyphs Element. This document discusses glyphs in WPF, but the description of the indices format is applicable to glyphs in Silverlight.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.