standardFonts
Function standardFonts
standardFonts(pdf: PDFDocument, family?: StandardFontFamily): Promise<StandardFontSet>Embed one of pdf-lib's three built-in standard font families — Helvetica, Times, or Courier (four faces each, drawn from the 14 standard PDF fonts) — and return all four faces ready to drop into a theme. No font files are downloaded or bundled; these are the standard PDF fonts every reader has.
This is the fastest way to get going: the regular + bold pair feeds any theme factory directly.
Parameters
-
pdf: PDFDocument -
family?: StandardFontFamily
Returns Promise<StandardFontSet>