Table of Contents

Enum GenericFamily

Namespace
Egami.Fonts
Assembly
Egami.Fonts.dll

A generic family name, matched against fixed per-platform preference lists.

public enum GenericFamily

Fields

Cursive = 3

A script face, such as Comic Sans MS or Apple Chancery.

Fantasy = 4

A decorative face, such as Impact or Papyrus.

Monospace = 2

A monospaced face, such as Consolas, Menlo or DejaVu Sans Mono.

SansSerif = 0

A sans-serif face, such as Segoe UI, Helvetica Neue or DejaVu Sans.

Serif = 1

A serif face, such as Times New Roman or DejaVu Serif.

Examples

// Installed fonts, found without native calls and indexed on first use; a style is matched by the CSS rules.
FontMatch? match = FontCollection.System.Match(GenericFamily.SansSerif, FontStyle.Bold);

// Your own fonts work the same way; System is read-only, so add the installed fonts to your collection to have both.
var fonts = new FontCollection();
fonts.AddFile(FontFile);
fonts.AddSystemFonts();
FontMatch noto = fonts.Match("Noto Sans", FontStyle.BoldItalic)!.Value;
Font font = noto.ToFont(16);