antialiased font in Dialog

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • antialiased font in Dialog

    Hi,
    I used STemWin and antialiased font 2bpp in my program.
    When diaply text using GUI_DispStringAt is OK, but using in Dialog, the TEXT WIDGET display as NORMAL font text (not antialiased font )
    Is it a BUG?
  • Hello,

    Thank you for your suggestion, I have done that. The Source are:

    GUI_Init(); /* Initialize the Graphics Component */
    GUI_SetFont(&font24hAA2);
    GUI_DispStringAt("M-2036Q2 V1.00", 76, 140);

    These is OK, but following program (in _cbDialog )NOT display in AA2 font:

    case WM_INIT_DIALOG:
    hItem = pMsg->hWin;
    WINDOW_SetBkColor(hItem, 0x00FFFFFF);

    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetFont(hItem, &font24hAA2);
    TEXT_SetText(hItem, "M-2036Q2 V1.00");

    The post was edited 1 time, last by chensie ().

  • Hello,
    I have used GUI_FontArial24 Generated by FontCvtST.exe:

    GUI_Init(); /* Initialize the Graphics Component */
    GUI_SetBkColor(GUI_WHITE);
    GUI_Clear();
    GUI_SetColor(GUI_BLACK);
    GUI_SetFont(&GUI_FontArial24);
    GUI_DispStringAt("M-2036Q2 V1.00", 60, 140);

    These are also OK! but in fellow source:

    static void _cbDialog(WM_MESSAGE * pMsg) {
    WM_HWIN hItem;
    switch (pMsg->MsgId) {
    case WM_INIT_DIALOG:
    hItem = pMsg->hWin;
    WINDOW_SetBkColor(hItem, 0x00FFFFFF);
    hItem = WM_GetDialogItem(pMsg->hWin, ID_TEXT_0);
    TEXT_SetTextAlign(hItem, GUI_TA_HCENTER | GUI_TA_VCENTER);
    TEXT_SetTextColor(hItem, GUI_BLACK);
    TEXT_SetBkColor(hItem, GUI_WHITE);
    TEXT_SetFont(hItem, &GUI_FontArial24);
    TEXT_SetText(hItem, "M-2036Q2 Ver1.00");

    These DONOT display correctly! The font file is Arial24.c.

    Best regards,
    Chensie Lei.
    Files
    • Arial24.zip

      (5.86 kB, downloaded 416 times, last: )

    The post was edited 2 times, last by chensie ().