Table of Contents

Property UseSystemFonts

Namespace
PdfSharp.Fonts
Assembly
PdfSharp.dll

UseSystemFonts

Gets or sets whether the Core build uses the fonts installed on the machine when no custom FontResolver is set. The default is true. FreePDF asks the Windows font table (if UseWindowsFontsUnderWindows or UseWindowsFontsUnderWsl2 is set) and the FallbackFontResolver first, then the folders added with AddFontDirectory(string), then the system's font folders. A common family that is not installed, such as Arial or Courier New, is replaced by a font with the same widths (Liberation Sans, Liberation Mono) or else by a common font of the same kind (DejaVu Sans), and a warning is logged. Only TrueType fonts whose licence allows embedding are used. Set it to false before the first font is used to require a custom font resolver, as PDFsharp 6.2.4 did. A custom font resolver gives fully reproducible output on every machine.

public static bool UseSystemFonts { get; set; }

Property Value

bool