Monospaced Font Structs With FontConverter and Emwin

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

    • Monospaced Font Structs With FontConverter and Emwin

      Hi All,

      I have been researching into using emWin and FontConverter and I have come across something that has left me puzzled. It appears that when creating a monospaced font in FontConverter it still makes use of proportional font structures. When I look into the structs in emWin I can see that a monospaced struct font does exist however it seems like it is largely unused:

      typedef struct {
      const unsigned char * pData;
      const U8 * pTransData;
      const GUI_FONT_TRANSINFO * pTrans;
      U16P FirstChar;
      U16P LastChar;
      U8 XSize;
      U8 XDist;
      U8 BytesPerLine;
      } GUI_FONT_MONO;

      I would like some clarification as to how to use these structs when creating fonts through FontConverter / modifying those files. Alternatively, any clarification on what pTransData, pTrans, XSize, XDist and BytesPerLine mean in this context would be great as they are not present in the fontconverter C files and I would like to make those files use these structs! :)
    • Hi,

      this structure is undocumented meaning it is only used by emWin internally. The structure is only used for the monospaced fonts that are part of emWin (such as "FontMono8x16").

      Font files generated by the Font Converter are not intended to be modified by hand as this could lead to unexpected behavior.

      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.