Enum GenericFamily
A generic family name, matched against fixed per-platform preference lists.
public enum GenericFamily
Fields
Cursive = 3A script face, such as Comic Sans MS or Apple Chancery.
Fantasy = 4A decorative face, such as Impact or Papyrus.
Monospace = 2A monospaced face, such as Consolas, Menlo or DejaVu Sans Mono.
SansSerif = 0A sans-serif face, such as Segoe UI, Helvetica Neue or DejaVu Sans.
Serif = 1A 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);