Defines a font style. Controls the font face, size, color, and
attributes. In order to remain generic, the only font faces available are
FONT_SERIF and FONT_SANS_SERIF. Document formatters should convert these
to the appropriate fonts for the target format.
The FontStyle represents the desired characteristics. There are no
guarentees that the document format generator will be able implement all
or any of the characteristics.
|
__init__(self,
style=None)
Create a new FontStyle object, accepting the default values. |
source code
|
|
|
set(self,
face=None,
size=None,
italic=None,
bold=None,
underline=None,
color=None)
Set font characteristics. |
source code
|
|
|
set_italic(self,
val)
0 disables italics, 1 enables italics |
source code
|
|
|
|
|
set_bold(self,
val)
0 disables bold face, 1 enables bold face |
source code
|
|
|
|
|
set_color(self,
val)
sets the color using an RGB color tuple |
source code
|
|
|
|
|
set_size(self,
val)
sets font size in points |
source code
|
|
|
|
|
set_type_face(self,
val)
sets the font face type |
source code
|
|
|
get_type_face(self)
returns the font face type |
source code
|
|
|
set_underline(self,
val)
1 enables underlining |
source code
|
|
|
get_underline(self)
1 indicates underlining |
source code
|
|