Vixen
02b45cc4
csharp
public sealed class ShapedText

A whole paragraph, shaped and ordered for drawing.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Everything here is in the font's design units, not pixels — see FontFace for why. Multiply by size / UnitsPerEm at the point of drawing.

Fields and properties (4)

  • public string Text

    The text it was shaped from.

  • public IReadOnlyList<ShapedRun> Runs

    The runs, in the order they are drawn — left to right.

  • public float Advance

    The paragraph's width in design units.

  • public IReadOnlyList<ClusterSpan> Clusters

    The shaping clusters, tiling the text, ordered as they are drawn.

Methods (3)

  • public IEnumerable<GlyphPlacement> Placements()

    Walks every glyph with the pen arithmetic already done.

  • public float CaretOffset(int index)

    Where a caret sits when it is in front of a character.

  • public int CaretIndexAt(float x)

    The caret position nearest a point.

Used by (15)

  • CaretTestsVixen.Ui.Text.Tests
  • EntryVixen.Ui.Text
  • FontFallbackTestsVixen.Ui.Tests
  • FontVariationTestsVixen.Ui.Text.Tests
  • LineWrapTestsVixen.Ui.Text.Tests
  • LineWrapperVixen.Ui.Text
  • ShapingCacheVixen.Ui.Text
  • ShapingCacheTestsVixen.Ui.Text.Tests
  • ShapingConformanceTestsVixen.Ui.Text.Tests
  • ShapingTestsVixen.Ui.Text.Tests
  • TextLineVixen.Ui
  • TextRunVixen.Ui
  • TextShaperVixen.Ui.Text
  • TextTestsVixen.Ui.Tests
  • VariationConformanceTestsVixen.Ui.Text.Tests