Vixen
02b45cc4
csharp
public readonly record struct AtlasGlyph

Where a glyph's field is in the atlas, and the quad to draw it in.

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

Remarks

⚠ Not GlyphPlacement, which this assembly already has and which means something else — where a shaped glyph sits in a run. Two types of one name in one assembly is a mistake nobody makes twice and everybody has to read around.

Fields and properties (7)

  • public AtlasRegion Region

    Its rectangle in the atlas texture, in pixels.

  • public float Left

    The quad's left edge, in ems from the pen position.

  • public float Top

    Its top edge, in ems above the baseline. Positive is up.

  • public float Right

    Its right edge, in ems from the pen.

  • public float Bottom

    Its bottom edge, in ems. Negative below the baseline.

  • public float ScreenPixelRange

    How many screen pixels one unit of the field's range covers, at a font size of one em. A shader multiplies this by the size it is drawing at to know how hard to threshold.

  • public bool IsEmpty

    Whether the glyph draws nothing, as a space does.

Methods (1)

  • public AtlasGlyph(AtlasRegion Region, float Left, float Top, float Right, float Bottom, float ScreenPixelRange)

    Where a glyph's field is in the atlas, and the quad to draw it in.

Used by (4)

  • GlyphFieldCacheVixen.Ui.Text
  • GlyphFieldCacheTestsVixen.Ui.Text.Tests
  • UiGeometryBuilderVixen.Ui
  • UiGeometryTestsVixen.Ui.Tests