This library has no font manager, meaning that font names are not translated to a font file (as required by the PDF backend). So the font-family value must specify the file.
CSS value lists are generally not supported and so fallback values in the font-family are interpreted as part of the font name (e.g. font-family: DejaVu Sans, sans-serif will cause this library to look for a file named "DejaVu Sans, san-serif.ttf").
CSS strings are not supported, so if the font-family value is quoted then the quotes are interpreted as part of the font name.
Currently, in order to specify a custom font you have to:
For example, if the DejaVu Sans font file can be found under fonts/DejaVuSans.ttf then the following must be used to select the font:
There are a few reasons for this requirement:
font-family: DejaVu Sans, sans-serif
will cause this library to look for a file named "DejaVu Sans, san-serif.ttf").