Back to index

Index


BitmapFont
Class Methods
BitmapFont.new( surface )
Instance Methods
BitmapFont#print( surface, coordinate, text )
Instance Methods
BitmapFont#print_centered( surface, y, text )
Instance Methods
BitmapFont#size( text )

BitmapFont

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.

Class Methods

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.

Instance Methods

BitmapFont#print( surface, coordinate, text )

Puts text on surface at coordinate which is an array of [x, y].

Instance Methods

BitmapFont#print_centered( surface, y, text )

Puts text on surface at y-coordinate y in the horizontal center of the screen.

Instance Methods

BitmapFont#size( text )

Returns the size [width, heigth] in pixels that text will take when written.

Back to index