PyGame Logo
PyGame
Documentation
||  Home  ||  Help Contents  ||
 
|| CD || Channel || Font || Joystick || Rect ||
|| Sound || Surface || pygame || cdrom || display ||
|| event || font || image || joystick || key ||
|| mixer || mouse || music || surfarray || time ||

Font

Font objects can control and render text.
get_ascent - gets the font ascent
get_bold - status of the bold attribute
get_bold - status of the italic attribute
get_descent - gets the font descent
get_height - average height of font glyph
get_linesize - gets the font recommended linesize
get_underline - status of the underline attribute
render - render text to a new image
set_bold - assign the bold attribute
set_italic - assign the italic attribute
set_underline - assign the underline attribute
size - size of rendered text

get_ascent
Font.get_ascent() -> int
 
get_bold
Font.get_bold() -> bool
 
get_bold
Font.get_bold() -> bool
 
get_descent
Font.get_descent() -> int
 
get_height
Font.get_height() -> int
 
get_linesize
Font.get_linesize() -> int
 
get_underline
Font.get_underline() -> bool
 
render
Font.render(text, antialias, fgcolor, [bgcolor]) -> Surface
 
set_bold
Font.set_bold(bool) -> None
 
set_italic
Font.set_italic(bool) -> None
 
set_underline
Font.set_underline(bool) -> None
 
size
Font.size(text) -> width, height