Difference between revisions of "love.graphics.newImageFont"

Line 1: Line 1:
Creates a new font by loading a [[ImageFontFormat |specifically formatted]] image.
+
{{newin|[[0.2.0]]|020|type=function}}
 +
Creates a new font by loading a [[ImageFontFormat|specifically formatted]] image.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===

Revision as of 23:11, 23 November 2011

Available since LÖVE 0.2.0
This function is not supported in earlier versions.

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