Vixen
02b45cc4

PositionedGlyph

struct Core/Vixen.Ui/TextRun.cs:20
csharp
public readonly record struct PositionedGlyph

One glyph and where to put it, in document space and in pixels.

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

Remarks

The pen arithmetic and the design-unit scaling are both already done, so a renderer needs the font's scale for nothing but the size of the quad. Everything upstream of this — HarfBuzz, ShapedText — works in the font's design units, because shaping is size-independent and a cache keyed on a pixel size would hold one entry per DPI scale of the same string.

Fields and properties (3)

  • public ushort GlyphId

    The glyph's index in the font. Not a character.

  • public float X

    Its origin's x.

  • public float Y

    Its origin's y, on the baseline, positive downwards like everything else here.

Methods (1)

  • public PositionedGlyph(ushort GlyphId, float X, float Y)

    One glyph and where to put it, in document space and in pixels.

Used by (8)

  • DrawListVixen.Ui
  • DrawListBuilderVixen.Ui
  • TextLineVixen.Ui
  • TextRunVixen.Ui
  • TextTestsVixen.Ui.Tests
  • UiGeometryBuilderVixen.Ui
  • UiGeometryTestsVixen.Ui.Tests
  • UiImageTestsVixen.Graphics.Golden.Tests