Difference between revisions of "Font"

m
m
Line 2: Line 2:
  
 
== Constructors ==
 
== Constructors ==
{{#ask: [[Category:Functions]] [[Constructs::Font]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[Constructs::Font]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
Line 8: Line 8:
 
}}
 
}}
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::Font||Object]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[parent::Font||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description

Revision as of 22:57, 23 June 2012

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

Object

See Also


Other Languages