Update notepad demo for anti-aliased fonts
This commit is contained in:
parent
e5b0168d7c
commit
ab04b1d076
@ -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,8 +57,9 @@
|
||||
#define GDISP_NEED_MSGAPI FALSE
|
||||
|
||||
/* Builtin Fonts */
|
||||
#define GDISP_INCLUDE_FONT_DEJAVUSANS12 TRUE
|
||||
#define GDISP_INCLUDE_FONT_DEJAVUSANS24 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
|
||||
|
@ -46,8 +46,8 @@ void drawScreen(void) {
|
||||
char *msg = "ChibiOS/GFX";
|
||||
font_t font1, font2;
|
||||
|
||||
font1 = gdispOpenFont("DejaVuSans24");
|
||||
font2 = gdispOpenFont("DejaVuSans12");
|
||||
font1 = gdispOpenFont("DejaVuSans24*");
|
||||
font2 = gdispOpenFont("DejaVuSans12*");
|
||||
|
||||
gdispClear(White);
|
||||
gdispDrawString(gdispGetWidth()-gdispGetStringWidth(msg, font1)-3, 3, msg, font1, Black);
|
||||
|
Loading…
Reference in New Issue
Block a user