RichTextKit v0.1

FontRun Class

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit

Represents a font run - a physical sequence of laid glyphs all with the same font and style attributes.

public class FontRun

Inheritance

FontRun → object

Constructors

FontRun()

Fields

Ascent

The ascent of the font used in this run

Clusters

The cluster numbers for each glyph

Descent

The descent of the font used in this run

Direction

The direction of this run

GlyphPositions

The glyph positions (relative to the entire text block)

Glyphs

The glyph indicies

Length

The length of this run (in codepoints)

RelativeCodePointXCoords

The x-coords of each code point, relative to this text run

RunKind

The kind of font run.

Start

Index into _codePoints buffer of the start of this run

Style

The user supplied style for this run

StyleRun

The style run this typeface run was derived from.

Typeface

The typeface of this run (use this over Style.Fontface)

Width

Width of this typeface run

XCoord

Horizontal position of this run, relative to the left margin

Properties

CodePoints

Get the code points of this run

End

The index of the first character after this run

HalfLeading

Calculate the half leading height for text in this run

Line

The line that owns this font run

NextRun

Get the next font run from this one

PreviousRun

Get the previous font run from this one

TextHeight

The height of text in this run (ascent + descent)

Methods

GetXCoordOfCodePointIndex(int)

Get the x-coord of a code point

LeadingWidth(int)

Calculates the leading width of all character from the start of the run (either the left or right depending on run direction) to the specified code point

MoveGlyphs(float, float)

Moves all glyphs by the specified offset amount

Overridden & Inherited

ToString()

For debugging