Difference between revisions of "love.graphics.getFont"

(See Also)
(Merge variant)
 
(One intermediate revision 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 ==
Line 28: Line 18:
 
* [[Font:getHeight]]
 
* [[Font:getHeight]]
 
* [[Font:getWidth]]
 
* [[Font:getWidth]]
 +
* [[love.graphics.print]]
 +
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Gets the current Font object.}}
 
{{#set:Description=Gets the current Font object.}}

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