Difference between revisions of "Gb.display.setFont"
From Gamebuino Wiki
(→Description: default fonts character map added) |
m (details about importing fonts added) |
||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
Change the font used in <code>gb.display.print</code> and <code>gb.display.drawChar</code> | Change the font used in <code>gb.display.print</code> and <code>gb.display.drawChar</code> | ||
+ | |||
+ | The font can be either one of the default fonts or a custom font. The tools to create your own are on [https://github.com/Rodot/Gamebuino Gamebuino's GitHub] in /utilities/font/font_editor. | ||
+ | |||
+ | To be able to use on of the default fonts, don't forget to add <code>extern const byte font3x3[];</code> at the beginning of your sketch (see example below). | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 19: | Line 23: | ||
== Parameters == | == Parameters == | ||
− | * font: the font you want to use | + | * font: the font you want to use. |
== Returns == | == Returns == |
Revision as of 2014-08-12T20:18:25
Description
Change the font used in gb.display.print
and gb.display.drawChar
The font can be either one of the default fonts or a custom font. The tools to create your own are on Gamebuino's GitHub in /utilities/font/font_editor.
To be able to use on of the default fonts, don't forget to add extern const byte font3x3[];
at the beginning of your sketch (see example below).
Error creating thumbnail: Unable to save thumbnail to destination
|
Error creating thumbnail: Unable to save thumbnail to destination
|
Error creating thumbnail: Unable to save thumbnail to destination
|
font3x3 | font3x5 | font5x7 |
Syntax
gb.display.setFont(font);
Parameters
- font: the font you want to use.
Returns
none
Example