Difference between revisions of "Font"

m
m
Line 13: Line 13:
 
}}
 
}}
 
== Supertypes ==
 
== Supertypes ==
[[Object]]
+
* [[parent::Object]]
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]

Revision as of 08:19, 20 May 2013

Defines the shape of characters than can be drawn onto the screen.

Constructors

love.graphics.newFontCreates a new Font from a TrueType Font or BMFont file.
love.graphics.newImageFontCreates a new Font by loading a specifically formatted image.

Functions

Font:getAscentGets the ascent of the Font in pixels.
Font:getBaselineGets the baseline of the Font in pixels.
Font:getDPIScaleGets the DPI scale factor of the Font.
Font:getDescentGets the descent of the Font in pixels.
Font:getFilterGets the filter mode for a font.
Font:getHeightGets the height of the Font in pixels.
Font:getKerningGets the kerning between two characters in the Font.
Font:getLineHeightGets the line height.
Font:getWidthDetermines the width of the given text.
Font:getWrapGets formatting information for text, given a wrap limit.
Font:hasGlyphsGets whether the Font can render a character or string.
Font:setFallbacksSets other Fonts to use if this Font doesn't have a specific character.
Font:setFilterSets the filter mode for a font.
Font:setLineHeightSets the line height.
Object:releaseImmediately destroys the object's Lua reference.
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.

Supertypes

See Also


Other Languages