BitmapFont.new( surface )
BitmapFont#print( surface, coordinate, text )
BitmapFont#print_centered( surface, y, text )
BitmapFont#size( text )
BitmapFont is made with the SFont library and prints text with bitmaps. It is maintained by Karl Bartel on <URL:http://www.linux-games.com/sfont/>. On his site, you can find fonts and some help.
BitmapFont.new( surface )
Creates a new SFont from the drawn characters in surface. To load a font directly from disc, use Surface.load_new('fontfilename') as the argument to SFont.new.
BitmapFont#print( surface, coordinate, text )
Puts text on surface at coordinate which is an array of [x, y].
BitmapFont#print_centered( surface, y, text )
Puts text on surface at y-coordinate y in the horizontal center of the screen.
BitmapFont#size( text )
Returns the size [width, heigth] in pixels that text will take when written.
Back to index