Difference between revisions of "love.graphics.newFont"

m (1 revision: Importing from potato (again).)
(Added variant)
Line 1: Line 1:
 
 
Creates a new Font.
 
Creates a new Font.
 
== Function ==
 
== Function ==
Line 11: Line 10:
 
=== Returns ===
 
=== Returns ===
 
{{param|Font|font|A Font object which can be used to draw text on screen.}}
 
{{param|Font|font|A Font object which can be used to draw text on screen.}}
 +
== Function ==
 +
This variant uses the default font (Vera Sans) with a custom size.
 +
=== Synopsis ===
 +
<source lang="lua">
 +
font = love.graphics.newFont( size )
 +
</source>
 +
=== Arguments ===
 +
{{param|number|size (12)|The size of the font.}}
 +
=== Returns ===
 +
{{param|Font|font|A Font object which can be used to draw text on screen.}}
 +
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Creates a new Font.}}
 
{{#set:Description=Creates a new Font.}}

Revision as of 12:17, 18 April 2010

Creates a new Font.

Function

Synopsis

font = love.graphics.newFont( filename, size )

Arguments

string filename
The filepath to the font file.
number size (12)
The size of the font.

Returns

Font font
A Font object which can be used to draw text on screen.

Function

This variant uses the default font (Vera Sans) with a custom size.

Synopsis

font = love.graphics.newFont( size )

Arguments

number size (12)
The size of the font.

Returns

Font font
A Font object which can be used to draw text on screen.

See Also