Use AppWizard font in emWIn

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

    • Use AppWizard font in emWIn

      How do I access the AppWizard font in emWin?

      I see the variable acArial_24_Normal_EXT_AA4 is used for the "Arial_24_Normal_EXT_AA4.xbf" font. I see the AppWizard API call APPW_GetFont().

      I cannot seem to get APPW_GetFont() to return 0 (success). No combination of using the window, widget IDs (or handles) seems to fill the GUI_FONT structure.


      C Source Code

      1. GUI_FONT FONT24; // global font variable
      2. ...
      3. // ID_SCREEN_00, ID_BUTTON_00 - crash
      4. // hScreen00, hButtons[0] - 1
      5. // 0, 0 - 1
      6. // ID_SCREEN_00, hButtons[0] - 1
      7. // hScreen00, ID_BUTTON_00 - 1
      8. dlog("APPW_GetFont() => %d", APPW_GetFont(ID_SCREEN_00, ID_BUTTON_00, &FONT24, acArial_24_Normal_EXT_AA4));
      where ID_SCREEN_00, ID_BUTTON_00 are the AppWizard IDs.

      It appears I need the GUI_XBF_DATA structure rather than the raw XBF array. Where do I get access to that guy?

      Cheers,
      Joe
    • Hi,

      the last parameter of APPW_GetFont() needs to be a pointer to a GUI_XBF_DATA structure instead of to an array of XBF data.

      Best regards,
      Florian
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.