Changes

Jump to navigation Jump to search

gc:setFont

869 bytes added, 19:36, 11 July 2011
Created page with "'''setFont''' is a function that is part of gc. Sets the font for drawing text and measuring text size. When you call this function, <br /> {{Since|3.0}} ==Sy..."
'''setFont''' is a function that is part of [[:Category:gc|gc]].

Sets the font for drawing text and measuring text size.
When you call this function,
<br /> {{Since|3.0}}

==Syntax==
gc:'''setFont'''(family, style, size, )

{| class="wikitable"
|-
! Parameter !! Type !! Description
|-
| <u><center>family</center></u> || string || the font's name : "serif" or "sansserif"
|-
| <u><center>style</center></u> || string || "r" for regular, "i" for italic, "b" for bold, "bi" for bold & italic
|-
| <u><center>size</center></u> || number || a number (decimals are OK) from 6 to 255
|-
|}

== 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>

<br />
[[Category:gc]]

Navigation menu