GlyphRun GlyphRun GlyphRun GlyphRun Class

Definition

Represents a sequence of glyphs from a single face of a single font at a single size, and with a single rendering style.

public ref class GlyphRun : System::ComponentModel::ISupportInitialize
public class GlyphRun : System.ComponentModel.ISupportInitialize
type GlyphRun = class
    interface DUCE.IResource
    interface ISupportInitialize
Public Class GlyphRun
Implements ISupportInitialize
Inheritance
GlyphRunGlyphRunGlyphRunGlyphRun
Implements

Remarks

The GlyphRun object includes font details such as glyph indices and individual glyph positions. In addition, The GlyphRun object contains the original Unicode code points the run was generated from, character to glyph buffer offset mapping information, and per-character and per-glyph flags.

The Glyphs element represents the output of a GlyphRun in XAML. The following markup syntax is used to describe the Glyphs element.

<!-- The example shows how to use a Glyphs object. -->
<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  >

   <StackPanel Background="PowderBlue">

      <Glyphs
         FontUri             = "C:\WINDOWS\Fonts\TIMES.TTF"
         FontRenderingEmSize = "100"
         StyleSimulations    = "BoldSimulation"
         UnicodeString       = "Hello World!"
         Fill                = "Black"
         OriginX             = "100"
         OriginY             = "200"
      />

   </StackPanel>
</Page>

Each glyph defines metrics that specify how it aligns with other Glyphs. The following graphic defines the various typographic qualities of two different glyph characters.

Diagraph of glyph measurements
Various typographic qualities of two different glyph characters

Constructors

GlyphRun() GlyphRun() GlyphRun() GlyphRun()

Initializes a new instance of the GlyphRun class.

GlyphRun(GlyphTypeface, Int32, Boolean, Double, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage) GlyphRun(GlyphTypeface, Int32, Boolean, Double, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage) GlyphRun(GlyphTypeface, Int32, Boolean, Double, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage) GlyphRun(GlyphTypeface, Int32, Boolean, Double, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage)

Initializes a new instance of the GlyphRun class by specifying properties of the class.

GlyphRun(GlyphTypeface, Int32, Boolean, Double, Single, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage) GlyphRun(GlyphTypeface, Int32, Boolean, Double, Single, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage) GlyphRun(GlyphTypeface, Int32, Boolean, Double, Single, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage) GlyphRun(GlyphTypeface, Int32, Boolean, Double, Single, IList<UInt16>, Point, IList<Double>, IList<Point>, IList<Char>, String, IList<UInt16>, IList<Boolean>, XmlLanguage)

Initializes a new instance of the GlyphRun class by specifying properties of the class.

GlyphRun(Single) GlyphRun(Single) GlyphRun(Single) GlyphRun(Single)

Initializes a new instance of the GlyphRun class.

Properties

AdvanceWidths AdvanceWidths AdvanceWidths AdvanceWidths

Gets or sets the list of Double values that represent the advance widths corresponding to the glyph indices.

BaselineOrigin BaselineOrigin BaselineOrigin BaselineOrigin

Gets or sets the baseline origin of the GlyphRun.

BidiLevel BidiLevel BidiLevel BidiLevel

Gets or sets the bidirectional nesting level of the GlyphRun.

CaretStops CaretStops CaretStops CaretStops

Gets or sets the list of Boolean values that determine whether there are caret stops for every UTF16 code point in the Unicode representing the GlyphRun.

Characters Characters Characters Characters

Gets or sets the list of UTF16 code points that represent the Unicode content of the GlyphRun.

ClusterMap ClusterMap ClusterMap ClusterMap

Gets or sets the list of UInt16 values that maps characters in the GlyphRun to glyph indices.

DeviceFontName DeviceFontName DeviceFontName DeviceFontName

Gets or sets the specific device font for which the GlyphRun has been optimized.

FontRenderingEmSize FontRenderingEmSize FontRenderingEmSize FontRenderingEmSize

Gets or sets the em size used for rendering the GlyphRun.

GlyphIndices GlyphIndices GlyphIndices GlyphIndices

Gets or sets an array of UInt16 values that represent the glyph indices in the rendering physical font.

GlyphOffsets GlyphOffsets GlyphOffsets GlyphOffsets

Gets or sets an array of Point values representing the offsets of the glyphs in the GlyphRun.

GlyphTypeface GlyphTypeface GlyphTypeface GlyphTypeface

Gets or sets the GlyphTypeface for the GlyphRun.

IsHitTestable IsHitTestable IsHitTestable IsHitTestable

Gets a value indicating whether there are any valid caret character hits within the GlyphRun.

IsSideways IsSideways IsSideways IsSideways

Gets or sets a value indicating whether to rotate glyphs.

Language Language Language Language

Gets or sets the XmlLanguage for the GlyphRun.

PixelsPerDip PixelsPerDip PixelsPerDip PixelsPerDip

Get or sets the PixelsPerDip at which the text should be rendered.

Methods

BuildGeometry() BuildGeometry() BuildGeometry() BuildGeometry()

Retrieves the Geometry for the GlyphRun.

ComputeAlignmentBox() ComputeAlignmentBox() ComputeAlignmentBox() ComputeAlignmentBox()

Retrieves the alignment box for the GlyphRun.

ComputeInkBoundingBox() ComputeInkBoundingBox() ComputeInkBoundingBox() ComputeInkBoundingBox()

Retrieves the ink bounding box for the GlyphRun.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetCaretCharacterHitFromDistance(Double, Boolean) GetCaretCharacterHitFromDistance(Double, Boolean) GetCaretCharacterHitFromDistance(Double, Boolean) GetCaretCharacterHitFromDistance(Double, Boolean)

Retrieves the CharacterHit value that represents the character hit of the caret of the GlyphRun.

GetDistanceFromCaretCharacterHit(CharacterHit) GetDistanceFromCaretCharacterHit(CharacterHit) GetDistanceFromCaretCharacterHit(CharacterHit) GetDistanceFromCaretCharacterHit(CharacterHit)

Retrieves the offset from the leading edge of the GlyphRun to the leading or trailing edge of a caret stop containing the specified character hit.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetNextCaretCharacterHit(CharacterHit) GetNextCaretCharacterHit(CharacterHit) GetNextCaretCharacterHit(CharacterHit) GetNextCaretCharacterHit(CharacterHit)

Retrieves the next valid caret character hit in the logical direction in the GlyphRun.

GetPreviousCaretCharacterHit(CharacterHit) GetPreviousCaretCharacterHit(CharacterHit) GetPreviousCaretCharacterHit(CharacterHit) GetPreviousCaretCharacterHit(CharacterHit)

Retrieves the previous valid caret character hit in the logical direction in the GlyphRun.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

ISupportInitialize.BeginInit() ISupportInitialize.BeginInit() ISupportInitialize.BeginInit() ISupportInitialize.BeginInit()

For a description of this member, see BeginInit().

ISupportInitialize.EndInit() ISupportInitialize.EndInit() ISupportInitialize.EndInit() ISupportInitialize.EndInit()

For a description of this member, see EndInit().

Applies to