Font List Funcs

class lwsdk.LWFontListFuncs(*args)

Bases: object

Proxy of C++ PCore::LWFontListFuncs class

 clear(int in_index)

Removes the font at the given index from the list. Fonts at higher indexes will be shifted up (their indexes will decrement) to fill the gap left by the removed font.

 count() → int

Returns the number of fonts in the list.

 index(char name) → int

Returns the list index for a named font, or -1 if a font of that name isn't in the list.

 load(char filename) → int

Adds the Postscript Type 1 font to the list and returns its list index, or -1 if the font couldn't be loaded. Since the font list is kept in an order that may differ from the order in which fonts are added, a font added by LWFontListFuncs::load() might be inserted anywhere in the list, not just at the end, and fonts with higher indexes will be shifted downward (incrementing their indexes).

Note that only Postscript fonts can be added to the list in this way. TrueType fonts are made available to Modeler indirectly, through operating system calls, rather than directly by reading their file contents.

 name(int in_index) → char

Returns the name of a font given its list index, or None if the index is less than 0 or greater than LWFontListFuncs::count() - 1.

Previous topic

State Query Funcs

Next topic

Layout Monitor

This Page