Skip to main content

API reference

These pages list every public type of PinataLabs.Typography, grouped by what it does. The guides explain how to use them together; these pages tell you what each member does.

The authoritative list of the public API is the file src/PinataLabs.Typography/PublicAPI.Shipped.txt. The build fails if the public API differs from it, so it is always up to date.

Namespaces​

NamespaceContains
PinataLabs.TypographyFonts, collections, layout options, measurement, rendering and metrics. Most code needs only this namespace.
PinataLabs.Typography.Tables.AdvancedTypographicTag and FeatureTags, to turn on OpenType features.
PinataLabs.Typography.UnicodeCodePoint, grapheme and code-point enumeration, and Unicode properties.
PinataLabs.Typography.WellKnownIdsKnownNameIds, the IDs of the strings in a font's name table.

Types by task​

TaskTypes
Load and find fontsFontCollection, SystemFonts, FontFamily, FontDescription
Make a fontFont, FontStyle
Set up a layoutTextOptions, TextRun
Measure textTextMeasurer, GlyphBounds
Get glyph outlinesTextRenderer, IGlyphRenderer, IColorGlyphRenderer, GlyphRendererParameters
Read metricsFontMetrics, HorizontalMetrics, VerticalMetrics, Glyph, GlyphMetrics
Rectangles and colorsFontRectangle, GlyphColor
OptionsEnumerations
UnicodeCodePoint and related types
ErrorsExceptions

Conventions​

  • Every method that takes text has an overload for string and one for ReadOnlySpan<char>.
  • Methods named TryGet... return false instead of throwing when the item is not found.
  • Lengths and positions in layout results are in pixels at TextOptions.Dpi. Values in FontMetrics and GlyphMetrics are in font units.