Fonts

getFontNames

getFontNames() -> list

Returns a list with the names of all available fonts.

getXFontNames

getXFontNames() -> list of tuples

Returns a larger font info. It's a list of the tuples with: [ (Scribus name, Family, Real name, subset (1|0), embed PS (1|0), font file), (...), ... ]

renderFont

renderFont("name", "filename", "sample", size, format="PPM") -> bool

Creates an image preview of font "name" with given text "sample" and size. If "filename" is not "", image is saved into "filename". Otherwise image data is returned as a string. The optional "format" argument specifies the image format to generate, and supports any format allowed by QPixmap.save(). Common formats are PPM, JPEG, PNG and XPM.

May raise NotFoundError if the specified font can't be found. May raise ValueError if an empty sample or filename is passed.