Difference between revisions of "love.graphics.getFont"

(Undo revision 26366 by Darkfrei (talk))
(Tag: Undo)
(Merge variant)
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
== Function ==
 
== Function ==
{{newin|[[0.9.0]]|090|type=variant}}
 
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 11: Line 10:
 
=== Returns ===
 
=== Returns ===
 
{{param|Font|font|The current Font. Automatically creates and sets the default font, if none is set yet.}}
 
{{param|Font|font|The current Font. Automatically creates and sets the default font, if none is set yet.}}
 
+
=== Notes ===
== Function ==
+
On version before 0.9.0, nil is returned if there are no fonts set beforehand.
{{oldin|[[0.9.0]]|090|type=variant}}
 
=== Synopsis ===
 
<source lang="lua">
 
font = love.graphics.getFont( )
 
</source>
 
=== Arguments ===
 
None.
 
=== Returns ===
 
{{param|Font|font|The current Font, or nil if none is set.}}
 
  
 
== See Also ==
 
== See Also ==
 
* [[parent::love.graphics]]
 
* [[parent::love.graphics]]
 
* [[love.graphics.setFont]]
 
* [[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.}}
Line 31: Line 25:
 
{{#set:PrettySince=0.9.0}}
 
{{#set:PrettySince=0.9.0}}
 
{{#set:Sub-Category=State}}
 
{{#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