Font is an object which takes the path of font file,
size, color, and whether to use
antialiasing. If you want to use font by its name rather
than the file path, use TTFQuery package. The font path resolution by its
name is a very complicated problem to achieve.
- TTFQuery — Find and Extract Information from TTF Files
TTFQuery builds on the FontTools-TTX package to allow the Python
programmer to accomplish a number of tasks:
- query the system to find installed fonts
- retrieve metadata about any TTF font file
- this includes the glyph outlines (shape) of individual code-points,
which allows for rendering the glyphs in 3D (such as is done in
- lookup/find fonts by:
- abstract family type
- proper font name
- build simple metadata registries for run-time font matching
Font struct which is a subtype of tuple. Its constructor
takes path, size, color (black by default), and
antialias (True by default).
(bool) Whether to apply antialiasing (True)
or not (False).
(wand.color.Color) The font color.
(basestring) The path of font file.
(numbers.Real) The font size.