Create a font with the FontCvtDemo program. The font displayed on the emulator has a border, but I don't want the border to exist. How can I remove it?
Display All
Source Code
- #define ID_WINDOW_0 (GUI_ID_USER + 0x00)
- #define ID_TEXT_0 (GUI_ID_USER + 0x01)
- #define ID_TEXT_1 (GUI_ID_USER + 0x02)
- static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
- { WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 30, 800, 480, 0, 0x0, 0 },
- { TEXT_CreateIndirect, "lowercase characters", ID_TEXT_0, 20, 100, 800, 100, 0, 0x64, 0 },
- { TEXT_CreateIndirect, "CAPITAL CHARACTERS", ID_TEXT_1, 20, 200, 800, 150, 0, 0x64, 0 },
- };
- static void _cbDialog(WM_MESSAGE* pMsg) {
- WM_HWIN hItem;
- switch (pMsg->MsgId) {
- case WM_INIT_DIALOG:
- hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
- TEXT_SetTextColor(hItem, GUI_GREEN);
- TEXT_SetFont(hItem, &GUI_FontArial50);
- hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_1);
- TEXT_SetFont(hItem, &GUI_FontArial50);
- TEXT_SetTextColor(hItem, GUI_RED);
- break;
- default:
- WM_DefaultProc(pMsg);
- break;
- }
- }
- void MainTask(void) {
- WM_HWIN hWin;
- GUI_Init();
- GUI_UC_SetEncodeUTF8(); // Enable UTF8 decoding
- WM_SetDesktopColor(GUI_YELLOW);
- hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
- while (1) {
- GUI_Delay(10);
- }
- }