QR Invoice supports Arial, Helvetica, Liberation Sans and Frutiger (In the version Pro 45 Light and Pro 65 Bold).

Liberation Sans is the only font with a license that allows the font to be embedded and thus shipped with the library.

For Arial, Helvetica and Frutiger it is required to locate the actual TTF file on the system.

FontManager is responsible for doing so. Depending on the operating system it looks at different default file system paths for TTF files and loads the matching ones.

If the desired font is not located at one of the default paths (please look at FontManager or its log output for paths), a client application can specify an additional file system location.

For this specify the system property QrInvoice.FontDirectory

java ... -DQrInvoice.FontDirectory=/path/to/a/fontdirectory

Setting an explicit font path in code

Alternatively you can define an explicit path to a TTF file for every font in code:

import ch.codeblock.qrinvoice.Font;

...

FontManager.setFontPath(FontFamily.FRUTIGER, "/path/to/regularFont.ttf", "/path/to/boldFont.ttf");