Skip to content

Loading fonts (Windows)

The PDF loading library asks the system API (DGI) to load the font; then checks the character set to set the subst_pitch_family to finally create the font.

1The PDF loading library builds the font path and then selects the best matching font according to the following criteria: weight, italic, charset, pitch family and face.
2If none are found suitable, a fallback mechanism is triggered to find the best match.

How does the fallback mechanism work?

1IF the charset is ANSI and the font-family is Fixed Pitch, THEN the “Courier New” font is returned.
2ELSE all fonts in the list that do not have charset AND whose font name does not contain the family name are skipped, THEN a score is computed based on the mentioned criteria AND the biggest score is returned.