Difference between revisions of "love.graphics.setFont"
m (1 revision: Importing from potato (again).) |
(Linkified + added See Also) |
||
Line 1: | Line 1: | ||
− | + | Set an already-loaded [[Font]] as the current font. | |
− | Set an already-loaded Font as the current font. | ||
This function doesn't allocate a new font and can be used in [[love.draw]] | This function doesn't allocate a new font and can be used in [[love.draw]] | ||
Line 43: | Line 42: | ||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
+ | * [[love.graphics.newFont]] | ||
+ | * [[love.graphics.getFont]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Set an already-loaded Font as the current font. | {{#set:Description=Set an already-loaded Font as the current font. | ||
}} | }} |
Revision as of 12:20, 18 April 2010
Set an already-loaded Font as the current font.
This function doesn't allocate a new font and can be used in love.draw
Contents
Function
Synopsis
love.graphics.setFont( font )
Arguments
Font font
- The Font object to use.
Returns
Nothing.
Function
Synopsis
love.graphics.setFont( filename, size )
Arguments
Returns
Nothing.
Function
Synopsis
love.graphics.setFont( size )
Arguments
number size (12)
- The size of the font.
Returns
Nothing.
Examples
Draw some text with default font, 18px
love.graphics.setFont(18)
function love.draw()
love.graphics.print("Hello", 300, 300)
end