Skip to content

PdfStandardFont class

View as Markdown

Namespace: PdfNetStack.Fonts
Assembly: PdfNetStack.dll
Package: PdfNetStack

One of the 14 standard PDF fonts (ISO 32000-1, 9.6.2.2). Viewers supply them, so nothing is embedded and files stay small. They cover Western and Central European Latin text, plus the Symbol and ZapfDingbats sets; for anything else, or for PDF/A, embed a font.

public sealed class PdfStandardFont : PdfFont

Inheritance

object ← PdfFont ← PdfStandardFont

Latin text uses WinAnsiEncoding (Windows-1252). Up to 37 other characters the font has, such as Ł, ő or −, get codes of their own per document. Standard fonts are not kerned. Line spacing follows the metric compatible fonts viewers substitute (Liberation Sans, Serif and Mono), which matches how browsers lay out the same families.

All 14 fonts.

public static IReadOnlyList<PdfStandardFont> All { get; }

IReadOnlyList<PdfStandardFont>

Courier, a monospace. Viewers usually show Courier New or Liberation Mono.

public static PdfStandardFont Courier { get; }

PdfStandardFont

Courier Bold.

public static PdfStandardFont CourierBold { get; }

PdfStandardFont

Courier Bold Oblique.

public static PdfStandardFont CourierBoldOblique { get; }

PdfStandardFont

Courier Oblique.

public static PdfStandardFont CourierOblique { get; }

PdfStandardFont

Family name, such as “Helvetica”.

public override string FamilyName { get; }

string

Helvetica, a sans serif. Viewers usually show Arial or Liberation Sans.

public static PdfStandardFont Helvetica { get; }

PdfStandardFont

Helvetica Bold.

public static PdfStandardFont HelveticaBold { get; }

PdfStandardFont

Helvetica Bold Oblique.

public static PdfStandardFont HelveticaBoldOblique { get; }

PdfStandardFont

Helvetica Oblique.

public static PdfStandardFont HelveticaOblique { get; }

PdfStandardFont

True for bold and heavier weights.

public override bool IsBold { get; }

bool

True for Courier, whose glyphs all have the same width.

public bool IsFixedPitch { get; }

bool

True for italic and oblique styles.

public override bool IsItalic { get; }

bool

PostScript name, as written to /BaseFont.

public override string Name { get; }

string

Symbol: Greek letters and mathematical signs, drawn from their Unicode characters.

public static PdfStandardFont Symbol { get; }

PdfStandardFont

Times Bold.

public static PdfStandardFont TimesBold { get; }

PdfStandardFont

Times Bold Italic.

public static PdfStandardFont TimesBoldItalic { get; }

PdfStandardFont

Times Italic.

public static PdfStandardFont TimesItalic { get; }

PdfStandardFont

Times Roman, a serif. Viewers usually show Times New Roman or Liberation Serif.

public static PdfStandardFont TimesRoman { get; }

PdfStandardFont

ZapfDingbats: the Unicode Dingbats block (✓, ✗, ❤, ➔ and more), drawn from their Unicode characters.

public static PdfStandardFont ZapfDingbats { get; }

PdfStandardFont

The standard font with this PostScript name, such as “Helvetica-Bold”, or null.

public static PdfStandardFont? FromName(string name)

name string

PdfStandardFont?