Represents a set of glyphs that are used for rendering fixed text.
| XAML | <Glyphs .../> |
| Scripting | To create an object using scripting, see CreateFromXAML. |
Properties
Canvas.Left,
Canvas.Top,
Canvas.ZIndex,
Clip,
Cursor,
Fill,
FontRenderingEmSize,
FontUri,
Height,
Indices,
Name,
Opacity,
OpacityMask,
OriginX,
OriginY,
RenderTransform,
RenderTransformOrigin,
Resources,
StyleSimulations,
Tag,
Triggers,
UnicodeString,
Width
Methods
AddEventListener,
CaptureMouse,
Equals,
FindName,
GetHost,
GetParent,
GetValue,
ReleaseMouseCapture,
RemoveEventListener,
SetValue
Events
Loaded,
MouseEnter,
MouseLeave,
MouseLeftButtonDown,
MouseLeftButtonUp,
MouseMove
Examples
The following example defines a Glyphs element in XAML. The source for this Glyphs output is an XPS package, which was then modified slightly for Silverlight XAML conformance and FontUri pathing. The referenced FontUri is the GUID-named subsetted font that was also produced in the XPS output. The Indices attribute is also set based on that output. The Indices adjust the advances (not the actual glyph index information), with the glyphs information in the UnicodeString.
| XAML |
<Canvas
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Glyphs Fill="#FF000000"
FontUri="Resources/23460227-2793-4F9D-DB34-7D3834712823.odttf"
FontRenderingEmSize="18" StyleSimulations="None" OriginX="72.024"
OriginY="87.624" UnicodeString="Hello, World!"
Indices=",85.333;,64;,57.333;,57.333;,70.667;,30.667;,25.333;,113.33;,70.667;,68;,57.333;,70.667;">
</Glyphs>
</Canvas> |
This code produces the following fixed text.
Fixed text fom Glyphs example
See Also
Text and Fonts Overview