aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/console
diff options
context:
space:
mode:
Diffstat (limited to 'demos/modules/console')
-rw-r--r--demos/modules/console/gfxconf.h8
-rw-r--r--demos/modules/console/main.c9
2 files changed, 14 insertions, 3 deletions
diff --git a/demos/modules/console/gfxconf.h b/demos/modules/console/gfxconf.h
index d3e99de4..bbea4a23 100644
--- a/demos/modules/console/gfxconf.h
+++ b/demos/modules/console/gfxconf.h
@@ -30,6 +30,14 @@
#define GDISP_NEED_ASYNC FALSE
#define GDISP_NEED_MSGAPI FALSE
+/* Builtin Fonts */
+#define GDISP_OLD_FONT_DEFINITIONS FALSE
+#define GDISP_INCLUDE_FONT_SMALL TRUE
+#define GDISP_INCLUDE_FONT_LARGER FALSE
+#define GDISP_INCLUDE_FONT_UI1 FALSE
+#define GDISP_INCLUDE_FONT_UI2 TRUE
+#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE
+
/* Features for the GWIN sub-system. */
#define GWIN_NEED_BUTTON FALSE
#define GWIN_NEED_CONSOLE TRUE
diff --git a/demos/modules/console/main.c b/demos/modules/console/main.c
index 830c9d00..1227e89a 100644
--- a/demos/modules/console/main.c
+++ b/demos/modules/console/main.c
@@ -37,6 +37,7 @@ BaseSequentialStream *S1, *S2, *S3;
int main(void) {
uint8_t i;
+ font_t font1, font2;
halInit();
chSysInit();
@@ -44,11 +45,13 @@ int main(void) {
/* initialize and clear the display */
gdispInit();
gdispClear(Black);
+ font1 = gdispOpenFont("UI2 Double");
+ font2 = gdispOpenFont("Small");
/* create the three console windows and set a font for each */
- GW1 = gwinCreateConsole(NULL, 0, 0, gdispGetWidth(), gdispGetHeight()/2, &fontUI2Double);
- GW2 = gwinCreateConsole(NULL, 0, gdispGetHeight()/2, gdispGetWidth()/2, gdispGetHeight(), &fontSmall);
- GW3 = gwinCreateConsole(NULL, gdispGetWidth()/2, gdispGetHeight()/2, gdispGetWidth(), gdispGetHeight(), &fontSmall);
+ GW1 = gwinCreateConsole(NULL, 0, 0, gdispGetWidth(), gdispGetHeight()/2, font1);
+ GW2 = gwinCreateConsole(NULL, 0, gdispGetHeight()/2, gdispGetWidth()/2, gdispGetHeight(), font2);
+ GW3 = gwinCreateConsole(NULL, gdispGetWidth()/2, gdispGetHeight()/2, gdispGetWidth(), gdispGetHeight(), font2);
/* Set the fore- and background colors for each console */
gwinSetColor(GW1, Green);