pyj2d :: font :: Font :: Class Font

Class Font

java.awt.Font --+
                |
               Font

pyj2d.font.Font

Instance Methods
 
__init__(self, name, size)
Return Font subclassed of java.awt.Font. Arguments include name of a system font and size of font. The name argument can be a string of comma-delimited names to specify fallbacks and use a default font if none found, or specify a font file (eg. 'resource/font.ttf') with a exception if file not found.
 
__str__(self)
 
__repr__(self)
 
render(self, text, antialias, color, background=None)
Render text onto surface. Arguments: text to render (string) antialias of text (bool) color of text (R,G,B) background color (R,G,B)
 
size(self, text)
Return size (width,height) of rendered text.
 
set_underline(self, setting=True)
Set font underline style. Optional setting, default to True.
 
get_underline(self)
Check if font is underlined.
 
set_bold(self, setting=True)
Set font bold style. Optional setting, default to True.
 
get_bold(self)
Check if font is bold.
 
set_italic(self, setting=True)
Set font italic style. Optional setting, default to True.
 
get_italic(self)
Check if font is italized.
 
get_height(self)
Return height of font.
 
get_linesize(self)
Return linesize of font.
 
get_ascent(self)
Return ascent of font.
 
get_descent(self)
Return descent of font.