diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/applications/notepad/gfxconf.h | 14 | ||||
-rw-r--r-- | demos/applications/notepad/main.c | 16 | ||||
-rw-r--r-- | demos/modules/gwin/widgets/gfxconf.h | 7 | ||||
-rw-r--r-- | demos/modules/gwin/widgets/main.c | 2 |
4 files changed, 17 insertions, 22 deletions
diff --git a/demos/applications/notepad/gfxconf.h b/demos/applications/notepad/gfxconf.h index 6755d30d..95d5dc5e 100644 --- a/demos/applications/notepad/gfxconf.h +++ b/demos/applications/notepad/gfxconf.h @@ -31,9 +31,9 @@ #define _GFXCONF_H
/* The operating system to use - one of these must be defined */
-#define GFX_USE_OS_CHIBIOS TRUE
-#define GFX_USE_OS_WIN32 FALSE
-#define GFX_USE_OS_POSIX FALSE
+//#define GFX_USE_OS_CHIBIOS TRUE
+//#define GFX_USE_OS_WIN32 FALSE
+//#define GFX_USE_OS_POSIX FALSE
/* GFX sub-systems to turn on */
#define GFX_USE_GDISP TRUE
@@ -57,11 +57,9 @@ #define GDISP_NEED_MSGAPI FALSE
/* Builtin Fonts */
-#define GDISP_INCLUDE_FONT_SMALL FALSE
-#define GDISP_INCLUDE_FONT_LARGER FALSE
-#define GDISP_INCLUDE_FONT_UI1 FALSE
-#define GDISP_INCLUDE_FONT_UI2 TRUE
-#define GDISP_INCLUDE_FONT_LARGENUMBERS TRUE
+#define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA TRUE
+#define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA TRUE
+#define GDISP_NEED_ANTIALIAS TRUE
/* Features for the GINPUT sub-system. */
#define GINPUT_NEED_MOUSE TRUE
diff --git a/demos/applications/notepad/main.c b/demos/applications/notepad/main.c index 261b09d4..24c292c4 100644 --- a/demos/applications/notepad/main.c +++ b/demos/applications/notepad/main.c @@ -46,8 +46,8 @@ void drawScreen(void) { char *msg = "ChibiOS/GFX";
font_t font1, font2;
- font1 = gdispOpenFont("UI2 Double");
- font2 = gdispOpenFont("LargeNumbers");
+ font1 = gdispOpenFont("DejaVuSans24*");
+ font2 = gdispOpenFont("DejaVuSans12*");
gdispClear(White);
gdispDrawString(gdispGetWidth()-gdispGetStringWidth(msg, font1)-3, 3, msg, font1, Black);
@@ -61,12 +61,12 @@ void drawScreen(void) { gdispDrawBox (5 * COLOR_SIZE + 3, 3, COLOR_SIZE, COLOR_SIZE, Black); /* White */
/* pens */
- gdispDrawString(OFFSET * 2, DRAW_PEN(1), "1", font2, Black);
- gdispDrawString(OFFSET * 2, DRAW_PEN(2), "2", font2, Black);
- gdispDrawString(OFFSET * 2, DRAW_PEN(3), "3", font2, Black);
- gdispDrawString(OFFSET * 2, DRAW_PEN(4), "4", font2, Black);
- gdispDrawString(OFFSET * 2, DRAW_PEN(5), "5", font2, Black);
-
+ gdispFillStringBox(OFFSET * 2, DRAW_PEN(1), PEN_SIZE, PEN_SIZE, "1", font2, White, Black, justifyCenter);
+ gdispFillStringBox(OFFSET * 2, DRAW_PEN(2), PEN_SIZE, PEN_SIZE, "2", font2, White, Black, justifyCenter);
+ gdispFillStringBox(OFFSET * 2, DRAW_PEN(3), PEN_SIZE, PEN_SIZE, "3", font2, White, Black, justifyCenter);
+ gdispFillStringBox(OFFSET * 2, DRAW_PEN(4), PEN_SIZE, PEN_SIZE, "4", font2, White, Black, justifyCenter);
+ gdispFillStringBox(OFFSET * 2, DRAW_PEN(5), PEN_SIZE, PEN_SIZE, "5", font2, White, Black, justifyCenter);
+
gdispCloseFont(font1);
gdispCloseFont(font2);
}
diff --git a/demos/modules/gwin/widgets/gfxconf.h b/demos/modules/gwin/widgets/gfxconf.h index 2b9d8f8f..4fdcf212 100644 --- a/demos/modules/gwin/widgets/gfxconf.h +++ b/demos/modules/gwin/widgets/gfxconf.h @@ -57,11 +57,8 @@ #define GDISP_NEED_MSGAPI FALSE /* Builtin Fonts */ -#define GDISP_INCLUDE_FONT_SMALL FALSE -#define GDISP_INCLUDE_FONT_LARGER FALSE -#define GDISP_INCLUDE_FONT_UI1 FALSE -#define GDISP_INCLUDE_FONT_UI2 TRUE -#define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE +#define GDISP_INCLUDE_FONT_DEJAVUSANS12 TRUE +#define GDISP_NEED_ANTIALIAS TRUE /* GDISP image decoders */ #define GDISP_NEED_IMAGE_NATIVE FALSE diff --git a/demos/modules/gwin/widgets/main.c b/demos/modules/gwin/widgets/main.c index 2daffee3..31b65a65 100644 --- a/demos/modules/gwin/widgets/main.c +++ b/demos/modules/gwin/widgets/main.c @@ -263,7 +263,7 @@ int main(void) { gfxInit(); // Set the widget defaults - gwinSetDefaultFont(gdispOpenFont("UI2")); + gwinSetDefaultFont(gdispOpenFont("*")); gwinSetDefaultStyle(&WhiteWidgetStyle, FALSE); gdispClear(White); |