Namespace Egami.Fonts
Classes
- BitmapColorGlyph
An sbix or CBDT glyph: its image, the strike's size and where the image goes, in font units with y up, so it scales with the font; the drawing code decodes and resamples it.
- CffOptions
What a bare CFF stream lacks and an sfnt would supply, for FromCff(ReadOnlyMemory<byte>, CffOptions?).
- CffStandardStrings
The Compact Font Format's predefined data (Adobe Technical Note #5176, appendices A and B): the 391 standard strings that string ids (SIDs) below 391 name, and the Standard and Expert encodings as glyph names by code.
- CharacterMap
One character map of a face, as stored: a cmap subtable for one (platform, encoding) pair, or a CFF font's own encoding as FreeType presents it (platform 7). Codes are the subtable's own: bytes for a Macintosh (1,0) map or a symbol font's (3,0) map, never translated to Unicode.
- CidSystemInfo
The character collection a CID-keyed font's CIDs belong to (its CFF ROS operator), such as Adobe-Japan1-7; PDF's CIDSystemInfo dictionary carries the same three values.
- ColorCompositePaint
Two paints composited: the source onto the backdrop with a blend or Porter-Duff mode.
- ColorGlyph
A glyph's color description from TryGetColorGlyph(ushort, FontPalette?, out ColorGlyph?, float): a PaintColorGlyph (COLR) or a BitmapColorGlyph (sbix, CBDT).
- ColorGlyphPaint
A paint clipped to a glyph's outline.
- ColorGlyphReferencePaint
Another color glyph's paint graph drawn here, as COLR's PaintColrGlyph reuses it.
- ColorLayersPaint
Paints drawn one over another, in order.
- ColorLine
The stops of a color gradient and what happens past them.
- ColorLinearGradientPaint
A linear gradient filling the clip: the color line runs from P0 toward P1, with lines of equal color parallel to P0–P2, as COLR defines it.
- ColorPaint
One node of a color glyph's paint graph, in font units with y up: COLR version 1 as OpenType 1.9.1 defines it (version 0 glyphs become layers of solid glyph fills), with variable values already taken at the face's position and palette colors resolved.
- ColorRadialGradientPaint
A gradient between two circles filling the clip.
- ColorSolidPaint
One color filling the clip.
- ColorSweepGradientPaint
A gradient around a center filling the clip, angles in degrees counter-clockwise from the x axis (y up).
- ColorTransformPaint
A paint under an affine transform in font units: COLR's transform, translate, scale, rotate and skew paints, each as its matrix (row vectors, y up).
- FontCollection
A set of faces grouped into families: the caller's own, or System for the fonts installed on the machine. Finds families by name and faces by style with the CSS Fonts Level 4 matching steps.
- FontFamily
The faces of one family in a FontCollection, matched by style.
- FontLoadOptions
How a font file is read: leniently with diagnostics (the default), or strictly.
- FontLoader
Tells what font data holds and loads every face of a collection.
- FontPalette
The palette a color font draws with: a CPAL palette by index or by the background it suits, with entries overridden, as CSS's font-palette and @font-palette-values.
- FontPaletteInfo
One CPAL palette of a face.
- FontSubset
A font holding only some glyphs of another, from FontSubsetter.
- FontSubsetter
Writes fonts that hold only the glyphs a document uses, as PDF embedding and SVG export want: TrueType, OpenType CFF or bare CFF, with composite glyphs and seac accents closed over and unused CFF subroutines dropped.
- GlyphRun
Positioned glyphs of one font, ready to draw: glyph ids, one position per glyph relative to the run's origin (the first baseline's left end, y down, in canvas units), and optionally the source text with the UTF-16 index each glyph came from, which lets a PDF writer keep text searchable.
- NamedInstance
A named instance of a variable font, such as "Bold Condensed", from its fvar table.
- PaintColorGlyph
A COLR glyph: its paint graph and, for version 1, the clip box the font gives.
- SubsetOptions
How Subset(Typeface, IEnumerable<ushort>, SubsetOptions?) writes a subset.
- Typeface
One font face: its names, style, metrics, character map, glyph outlines and kerning, read from a TrueType or OpenType font, a collection, or a bare CFF stream. Immutable and safe to share across threads, canvases and backends.
- VariationAxis
One axis of a variable font, from its fvar table.
Structs
- CharacterMapping
A code and the glyph a CharacterMap gives it.
- ColorStop
A stop of a color line.
- Font
A typeface at a size: the em in canvas units (pixels on a raster, points on a PDF page). Scales the face's font-unit metrics and turns text into a positioned GlyphRun.
- FontExtents
A face's vertical metrics and decoration positions, with y up: in font units from Extents, or in canvas units from Extents.
- FontMatch
A matched face and the styling it lacks, from Match(FontStyle).
- FontNameRecord
One decoded string of a font's naming table, such as the family name in one language.
- FontPaletteEntry
One palette entry replaced, as CSS's override-colors.
- FontProbe
The result of Probe(ReadOnlySpan<byte>).
- FontStyle
A face's style, or the style asked for when matching: weight from 1 to 1000 (400 normal, 700 bold), width from 1 to 9 (5 normal, as OS/2 usWidthClass), and slant.
- FontTag
A four-byte OpenType tag, such as the table tag
glyfor the feature tagkern.
- FontVariation
A position on one axis of a variable font, in the axis's own units, such as weight 650.
- GlyphColor
A color in a color glyph: a resolved palette color, or the foreground (palette entry 0xFFFF), which takes the paint's color and keeps only this color's alpha as a factor.
- GlyphExtents
A box around ink, such as a glyph's outline, with y up in font units or in a Font's size.
- GlyphTransform
A glyph's placement in a transformed GlyphRun: a rotation and uniform scale, then its origin, as Skia's RSXform. A point (x, y) of the glyph, y down, goes to (ScaleCos x - ScaleSin y + Tx, ScaleSin x + ScaleCos y + Ty).
- TextBounds
A box in canvas units with y down, such as the ink of a GlyphRun relative to its origin.
- TextMeasure
The size of text as MeasureText(string, ShapingOptions?) lays it out, in canvas units.
- VerticalMetrics
One set of a face's ascent, descent and line gap as stored in a table, in font units with y up.
Interfaces
- IColorPaintVisitor
Walks a color glyph's paint graph, one method per kind of node.
- IGlyphOutlineSink
Receives a glyph outline from GetGlyphOutline(ushort, IGlyphOutlineSink), in font units with y up. Each contour starts with MoveTo(float, float) and ends with Close(); a closing line back to the start point is implied by Close() and not sent.
Enums
- BitmapGlyphEncoding
The encoding of a bitmap glyph's image.
- ColorExtend
What a color gradient does past the ends of its color line.
- ColorGlyphFormats
The kinds of color glyph data a face holds.
- FontEdging
How a glyph's edges are turned into pixels.
- FontEmbedding
The embedding permissions a face declares in its OS/2 fsType field. Egami reports them and never enforces them; a caller that embeds fonts, such as a PDF writer, decides what to do.
- FontFileKind
What kind of font data some bytes hold, as Probe(ReadOnlySpan<byte>) sees it.
- FontHinting
How glyph outlines are fitted to the pixel grid before rasterizing.
- FontMetrics
Where a font's advances come from.
- FontOutlines
How a face stores its glyph outlines.
- FontPaletteBackground
Which palettes FontPalette prefers by the backgrounds CPAL says they suit.
- FontSlant
Whether a face is upright, italic or oblique.
- FontSynthesis
Styling a face lacks, which a matched Font asks the renderer to synthesize (drawn from 2.7.2 on).
- GenericFamily
A generic family name, matched against fixed per-platform preference lists.
- OpticalSizing
Whether a Font sets a variable font's optical size axis from its size.
- SubsetFormat
What FontSubsetter writes.
- TrueTypeTarget
Which rasterizer the TrueType interpreter answers for: what GETINFO tells the font and how instructions are softened.