A font file (TTF / OTF / TTC): fallback font used for appearances and rendering of glyphs missing from the standard 14 fonts (such as CJK text).
A directory ending with /: reads ${url}fonts.json ([{ family, filePath }]) and passes the whole font group to the engine. An annotation font is selected only when its name is the font's PostScript name
(the fonts.json family should match it and must not contain spaces); names the engine does not know use the first font of the group. The UI layer builds the font dropdown from fonts.json.
One of each kind is kept (a later one of the same kind replaces the earlier). Downloaded once on the main thread and passed to the main Worker and every render pool Worker; sent immediately when the Worker is already running (preloadPDFWorker waits for it to load).
Passing null stops giving either kind to Workers created afterwards; already loaded fonts are kept.
Sets custom fonts:
${url}fonts.json([{ family, filePath }]) and passes the whole font group to the engine. An annotation font is selected only when its name is the font's PostScript name (the fonts.json family should match it and must not contain spaces); names the engine does not know use the first font of the group. The UI layer builds the font dropdown from fonts.json. One of each kind is kept (a later one of the same kind replaces the earlier). Downloaded once on the main thread and passed to the main Worker and every render pool Worker; sent immediately when the Worker is already running (preloadPDFWorker waits for it to load). Passing null stops giving either kind to Workers created afterwards; already loaded fonts are kept.