Font constants
Font.bold | Font.helvetica | Font.screen | Font.times | |
Font.courier | Font.italic | Font.symbol | Font.zapf_dingbats | |
Font:get_font | Font:get_font_name | Font:set_font | Font:set_fonts |
FLTK manages fonts via an array indexed by small integers. Font provides named fonts and functions to manipulate the font array.
Base emphasis Helvetica (or Arial on Win32). You may add both
Font.bold and Font.italic to get bold and oblique versions.
Base emphasis Times. You may add both Font.bold and
Font.italic to get bold and italic versions.
Base emphasis Courier. You may add both Font.bold and
Font.italic to get bold and oblique versions.
The Symbol font. No emphasized versions are available.
Base emphasis of a standard monospaced screen font. You may add
Font.bold for a bold version, but no italic or oblique is
available.
The Zapf Dingbats font. No emphasized versions are available.
Add this to other fonts to bold them. For example, Font.times + Font.bold
Add this to other fonts to make them italic or oblique. For
example, Font.courier + Font.italic
Get the string for this face. This string is different for each face. Under X
this value is passed to XListFonts to get all the sizes of this face
Set the font string of a Font.
Get a human-readable string describing the family of this face. This
is useful if you are presenting a choice to the user. There is no
guarantee that each face has a different name.
The emphasis returned is 0, Font.bold,
Font.italic or Font.bold+Font.italic. To locate a
"family" of fonts, search forward and back for a set with
non-zero attributes; these faces along with the face with a zero
attribute before them constitute a family. FLTK will open the display, and add every font on the server to the
face table. It will attempt to put "families" of faces
together, so that the normal one is first, followed by bold, italic,
and bold italic.
The optional argument is a string to describe the set of fonts to
add. Passing nil will select only fonts that have the
ISO8859-1 character set (and are thus usable by normal text). Passing
"-*" will select all fonts with any encoding as long as they
have normal X font names with dashes in them. Passing "*"
will list every font that exists (on X this may produce some strange
output). Other values may be useful but are system dependent. With
WIN32 nil selects fonts with ISO8859-1 encoding and
non-nil selects all fonts. The return value is how many faces are in the table after this is
done. Font.times: Font
Font.courier: Font
Font.symbol: Font
Font.screen: Font
Font.zapf_dingbats: Font
Font.bold: Font
Font.italic: Font
Font:get_font(Font f): string
Font:set_font(Font f): integer
Font:get_font_name(Font f): string name, Font emphasis
Font:set_fonts(string name): integer
doctool generated at Sun Aug 12 22:23:18 2001