Difference between revisions of "love.graphics.newImageFont"

m
(Function)
Line 3: Line 3:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
font = love.graphics.newImageFont( Image, glyphs )
+
font = love.graphics.newImageFont( image, glyphs )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|Image|Image|The Image object to create the font from.}}
+
{{param|Image|image|The Image object to create the font from.}}
 
{{param|string|glyphs|A string of the characters in the image in order from left to right.}}
 
{{param|string|glyphs|A string of the characters in the image in order from left to right.}}
 
=== 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 ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===

Revision as of 02:34, 25 January 2011

Creates a new font by loading a specifically formatted image.

Function

Synopsis

font = love.graphics.newImageFont( image, glyphs )

Arguments

Image image
The Image object to create the font from.
string glyphs
A string of the characters in the image in order from left to right.

Returns

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

Function

Synopsis

font = love.graphics.newImageFont( filename, glyphs )

Arguments

string filename
The filepath to the image file.
string glyphs
A string of the characters in the image in order from left to right.

Returns

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

See Also

Other Languages