Update notepad demo for anti-aliased fonts
This commit is contained in:
parent
e5b0168d7c
commit
ab04b1d076
2 changed files with 8 additions and 7 deletions
|
@ -31,9 +31,9 @@
|
||||||
#define _GFXCONF_H
|
#define _GFXCONF_H
|
||||||
|
|
||||||
/* The operating system to use - one of these must be defined */
|
/* The operating system to use - one of these must be defined */
|
||||||
#define GFX_USE_OS_CHIBIOS TRUE
|
//#define GFX_USE_OS_CHIBIOS TRUE
|
||||||
#define GFX_USE_OS_WIN32 FALSE
|
//#define GFX_USE_OS_WIN32 FALSE
|
||||||
#define GFX_USE_OS_POSIX FALSE
|
//#define GFX_USE_OS_POSIX FALSE
|
||||||
|
|
||||||
/* GFX sub-systems to turn on */
|
/* GFX sub-systems to turn on */
|
||||||
#define GFX_USE_GDISP TRUE
|
#define GFX_USE_GDISP TRUE
|
||||||
|
@ -57,8 +57,9 @@
|
||||||
#define GDISP_NEED_MSGAPI FALSE
|
#define GDISP_NEED_MSGAPI FALSE
|
||||||
|
|
||||||
/* Builtin Fonts */
|
/* Builtin Fonts */
|
||||||
#define GDISP_INCLUDE_FONT_DEJAVUSANS12 TRUE
|
#define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA TRUE
|
||||||
#define GDISP_INCLUDE_FONT_DEJAVUSANS24 TRUE
|
#define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA TRUE
|
||||||
|
#define GDISP_NEED_ANTIALIAS TRUE
|
||||||
|
|
||||||
/* Features for the GINPUT sub-system. */
|
/* Features for the GINPUT sub-system. */
|
||||||
#define GINPUT_NEED_MOUSE TRUE
|
#define GINPUT_NEED_MOUSE TRUE
|
||||||
|
|
|
@ -46,8 +46,8 @@ void drawScreen(void) {
|
||||||
char *msg = "ChibiOS/GFX";
|
char *msg = "ChibiOS/GFX";
|
||||||
font_t font1, font2;
|
font_t font1, font2;
|
||||||
|
|
||||||
font1 = gdispOpenFont("DejaVuSans24");
|
font1 = gdispOpenFont("DejaVuSans24*");
|
||||||
font2 = gdispOpenFont("DejaVuSans12");
|
font2 = gdispOpenFont("DejaVuSans12*");
|
||||||
|
|
||||||
gdispClear(White);
|
gdispClear(White);
|
||||||
gdispDrawString(gdispGetWidth()-gdispGetStringWidth(msg, font1)-3, 3, msg, font1, Black);
|
gdispDrawString(gdispGetWidth()-gdispGetStringWidth(msg, font1)-3, 3, msg, font1, Black);
|
||||||
|
|
Loading…
Add table
Reference in a new issue