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
| Namespace | Contains |
|---|---|
PinataLabs.Typography | Fonts, collections, layout options, measurement, rendering and metrics. Most code needs only this namespace. |
PinataLabs.Typography.Tables.AdvancedTypographic | Tag and FeatureTags, to turn on OpenType features. |
PinataLabs.Typography.Unicode | CodePoint, grapheme and code-point enumeration, and Unicode properties. |
PinataLabs.Typography.WellKnownIds | KnownNameIds, the IDs of the strings in a font's name table. |
Types by task
| Task | Types |
|---|---|
| Load and find fonts | FontCollection, SystemFonts, FontFamily, FontDescription |
| Make a font | Font, FontStyle |
| Set up a layout | TextOptions, TextRun |
| Measure text | TextMeasurer, GlyphBounds |
| Get glyph outlines | TextRenderer, IGlyphRenderer, IColorGlyphRenderer, GlyphRendererParameters |
| Read metrics | FontMetrics, HorizontalMetrics, VerticalMetrics, Glyph, GlyphMetrics |
| Rectangles and colors | FontRectangle, GlyphColor |
| Options | Enumerations |
| Unicode | CodePoint and related types |
| Errors | Exceptions |
Conventions
- Every method that takes text has an overload for
stringand one forReadOnlySpan<char>. - Methods named
TryGet...returnfalseinstead of throwing when the item is not found. - Lengths and positions in layout results are in pixels at
TextOptions.Dpi. Values inFontMetricsandGlyphMetricsare in font units.