| |
- Font
class Font |
|
Represents a named font.
Constructor options are:
font -- font specifier (name, system font, or (family, size, style)-tuple)
or any combination of
family -- font 'family', e.g. Courier, Times, Helvetica
size -- font size in points
weight -- font thickness: NORMAL, BOLD
slant -- font slant: NORMAL, ITALIC
underline -- font underlining: false (0), true (1)
overstrike -- font strikeout: false (0), true (1)
name -- name to use for this font configuration (defaults to a unique name)
|
| |
- __del__(self)
- no doc string
- __init__(self, root=None, font=None, name=None, **options)
- no doc string
- __str__(self)
- no doc string
- _get(self, args)
- no doc string
- _mkdict(self, args)
- no doc string
- _set(self, kw)
- no doc string
- actual(self, option=None)
- Return actual font attributes
- cget(self, option)
- Get font attribute
- config(self, **options)
- Modify font attributes
- config(self, **options)
- Modify font attributes
- copy(self)
- Return a distinct copy of the current font
- measure(self, text)
- Return text width
- metrics(self, *options)
- Return font metrics.
- For best performance, create a dummy widget
- using this font before calling this method.
| |