Loads the font that best matches the parameters.
Uses fontconfig for font matching.
family |
the font family name or null |
size |
the preferred size in points or -1 for any size |
dpi |
the screen resolution or -1 to ignore dpi |
weight |
the font weight (e.g. bold) or -1 for any weight |
slant |
the font slant (e.g. italic) or -1 for any slant |
width |
the font width (e.g. narrow) or -1 for any width |
monospace |
set to true to prefer a monospace font |
lang |
a RFC-3066-style language code or null |
script |
an ISO 15924 script code or null |
the font or null if there was an error |