Table of Contents

Enum FontOutlines

Namespace
Egami.Fonts
Assembly
Egami.Fonts.dll

How a face stores its glyph outlines.

public enum FontOutlines

Fields

Cff = 1

Cubic Type 2 charstrings in a Compact Font Format table (CFF, or CFF2 in a variable font), in an OpenType font or as a bare CFF stream.

None = 2

No outlines: a color font of bitmaps only (CBDT or sbix), whose glyphs draw from their images and have no paths, or a font with no glyph data at all (a subset made for shaping), whose glyphs are empty.

TrueType = 0

TrueType quadratic outlines in the 'glyf' table.

Examples

// One face from a file; a collection takes an index. The bytes are read once and every table is parsed when first needed.
Typeface face = Typeface.FromFile(FontFile);
Console.WriteLine($"{face.FamilyName} {face.SubfamilyName}, {face.GlyphCount} glyphs, {face.UnitsPerEm} units per em");

// What a file holds, from its header alone.
FontProbe probe = FontLoader.Probe(File.ReadAllBytes(FontFile));
Console.WriteLine($"{probe.Kind}, {probe.FaceCount} face(s), {probe.Outlines} outlines");

// Damaged fonts load leniently with diagnostics; Strict throws instead.
var seen = new List<EgamiDiagnostic>();
var options = new FontLoadOptions { Context = EgamiContext.Default with { Diagnostics = seen.Add } };
Typeface lenient = Typeface.FromMemory(File.ReadAllBytes(FontFile), 0, options);