Changes

Jump to navigation Jump to search

gc:setFont

75 bytes added, 19:15, 23 August 2011
m
no edit summary
Line 2: Line 2:     
Sets the font for drawing text and measuring text size.
 
Sets the font for drawing text and measuring text size.
When you call this function,  
+
 
 +
When you call this function, a string containing the previously used font is also returned. (See example)
 +
 
 
<br /> {{Since|3.0}}
 
<br /> {{Since|3.0}}
    
==Syntax==
 
==Syntax==
gc:'''setFont'''(family, style, size)
+
gc:'''setFont'''(family, style, size)
    
{| class="wikitable"
 
{| class="wikitable"
Line 21: Line 23:     
== Example ==  
 
== Example ==  
<syntaxhighlight>previousFont = gc:setFont("serif","bi",12) -- sets the font to Serif, Bold & Italic, Size 12. It also sets the name of the previous font (the one used before this function) in the variable 'previousfont'</syntaxhighlight>
+
<syntaxhighlight>previousFont = gc:setFont("serif","bi",12) -- sets the font to Serif, Bold & Italic, Size 12. It also sets the name of the previous font (the one used before this function) in the variable 'previousFont'</syntaxhighlight>
    
<br />
 
<br />
 
[[Category:gc]]
 
[[Category:gc]]

Navigation menu