Difference between revisions of "Font"

m
(See Also)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Can be used to draw text on screen.
+
Defines the shape of characters that can be drawn onto the screen.
 +
 
 
== Constructors ==
 
== Constructors ==
{{#ask: [[Category:Functions]] [[Constructs::Font]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[Constructs::Font]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 
| ?Description
 
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 
}}
 
}}
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::Font]] OR [[parent::Object]] [[Since::<071]]
+
{{#ask: [[Category:Functions]] [[parent::Font||Object]] [[Concept:Current]]
 
| headers=hide
 
| headers=hide
 +
| format=template
 +
| template=ListingFields
 +
| introtemplate=ListingIntro
 +
| outrotemplate=ListingOutro
 
| ?Description
 
| ?Description
 +
| ?PrettySince
 +
| ?PrettyRemoved
 
}}
 
}}
 
== Supertypes ==
 
== Supertypes ==
[[Object]]
+
* [[parent::Object]]
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 +
* [[love.graphics.getFont]]
 
[[Category:Types]]
 
[[Category:Types]]
{{#set:Description=Can be used to draw text on screen.}}
+
{{#set:Description=Defines the shape of characters than can be drawn onto the screen.}}
 
{{#set:Since=000}}
 
{{#set:Since=000}}
 +
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Font}}
 
{{i18n|Font}}

Latest revision as of 11:47, 21 March 2022

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

Constructors

love.graphics.newFont Creates a new Font from a TrueType Font or BMFont file.
love.graphics.newImageFont Creates a new Font by loading a specifically formatted image. Added since 0.2.0

Functions

Font:getAscent Gets the ascent of the Font in pixels. Added since 0.9.0
Font:getBaseline Gets the baseline of the Font in pixels. Added since 0.9.0
Font:getDPIScale Gets the DPI scale factor of the Font. Added since 11.0
Font:getDescent Gets the descent of the Font in pixels. Added since 0.9.0
Font:getFilter Gets the filter mode for a font. Added since 0.9.0
Font:getHeight Gets the height of the Font in pixels.
Font:getKerning Gets the kerning between two characters in the Font. Added since 11.4
Font:getLineHeight Gets the line height.
Font:getWidth Determines the width of the given text.
Font:getWrap Gets formatting information for text, given a wrap limit. Added since 0.7.0
Font:hasGlyphs Gets whether the Font can render a character or string. Added since 0.9.0
Font:setFallbacks Sets other Fonts to use if this Font doesn't have a specific character. Added since 0.10.0
Font:setFilter Sets the filter mode for a font. Added since 0.9.0
Font:setLineHeight Sets the line height.
Object:release Immediately destroys the object's Lua reference. Added since 11.0
Object:type Gets the type of the object as a string.
Object:typeOf Checks whether an object is of a certain type.

Supertypes

See Also


Other Languages