Difference between revisions of "love.graphics.getFont"

m
(Merge variant)
 
(10 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
Gets the current Font object.
 
Gets the current Font object.
 +
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
Line 8: Line 9:
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|Font|font|The current Font, or nil of none is set.}}
+
{{param|Font|font|The current Font. Automatically creates and sets the default font, if none is set yet.}}
 +
=== Notes ===
 +
On version before 0.9.0, nil is returned if there are no fonts set beforehand.
 +
 
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 +
* [[love.graphics.setFont]]
 +
* [[Font:getHeight]]
 +
* [[Font:getWidth]]
 +
* [[love.graphics.print]]
 +
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Gets the current Font object.}}
 
{{#set:Description=Gets the current Font object.}}
 +
{{#set:Since=090}}
 +
{{#set:PrettySince=0.9.0}}
 +
{{#set:Sub-Category=State}}
 +
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.graphics.getFont}}
 
{{i18n|love.graphics.getFont}}

Latest revision as of 02:54, 21 October 2022

Gets the current Font object.

Function

Synopsis

font = love.graphics.getFont( )

Arguments

None.

Returns

Font font
The current Font. Automatically creates and sets the default font, if none is set yet.

Notes

On version before 0.9.0, nil is returned if there are no fonts set beforehand.

See Also



Other Languages