def load(filename)
Load font file.
def load_default()
Load a (probably rather ugly) default font.
def load_path(filename)
Load font file.
def truetype(filename, size, index=0)
Load a TrueType or OpenType font file, and create a font object.
load(filename)
Load font file. This function loads a font object from the given bitmap font file, and returns the corresponding font object.
filename
-- Name of font file.
A font object.
IOError
-- Raised if the file could not be read.
load_default()
Load a (probably rather ugly) default font.
A font object.
load_path(filename)
Load font file. Same as load, but searches for a bitmap font along the Python path.
filename
-- Name of font file.
A font object.
IOError
-- Raised if the file could not be read.
truetype(filename, size, index=0)
Load a TrueType or OpenType font file, and create a font object. This function loads a font object from the given file, and creates a font object for a font of the given size.
This function requires the _imagingft service.
filename
-- A truetype font file. Under Windows, if the file
is not found in this filename, the loader also looks in Windows
fonts directory
size
-- The requested size, in points.
index
-- Which font face to load (default is first available face).
A font object.
IOError
-- Raised if the file could not be read.