Font size created by Appwizard is too big

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

    • Font size created by Appwizard is too big

      Hi , segger
      I am using the appwizard to show text. But i found the font size created by Appwizard is too big. Although I have defined the codepoints "Project text only",every font size is at least 150KB. When I check the font data on c file , i found that there are many 0x00 data in const unsigned char array. I think that's a big waste of rom usage. Is there any way to reduce font size created by Appwizard?
    • Hi,

      Are you referring to the size of the generated c-file or the xbf-file?

      The size of the c-file doesn't say anything about the size on the target.

      I just gave it a try and the generated xbf-file has a size of ~20KB with the following code point ranges:

      0x0000 - 0x007F
      0x0100 - 0x017F
      0x0180 - 0x024F

      The size of the font is 24 pixel.

      Of course, it depends pretty much on the font itself how much data are included in the file.

      The size of the xbf-file is the size it takes on the hardware.

      Which font are you using?

      EDIT: You can also further shrink the font size if you select the "Project text only" option in the code point definnition dialog.

      Regards,
      Sven
      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.
    • Hi Sven,
      Thanks for your reply.

      I want to show chinese text , and I use the font "Source Han Sans CN Light" and "Microsoft YaHei".

      I found that if i use chinese character , then font size data of the generated would be bigger than 150KB. Even though I have selected "Project text only" option in the code point definnition dialog. But if i delete the chinese character only ASCII character left, the size seems normal only 10KB.

      for example ,when I have used chinese character , "Source Han Sans CN Light" height 30 , the xbf file informaion is as follow:
      "CNLight_30_Light_EXT_AA2.xbf ... 157KB "

      and the c file array of the generated is:
      const unsigned char acCNLight_30_Light_EXT_AA2[160265UL + 1] = {
      0x47, 0x55, 0x49, 0x58, ...
      ...
      0x32, 0x2C, 0x55,....
      }
      The size of the xbf-file is the same to the c file data array byte size.
      Please refer to the attachment "CNLight_30_Light_EXT_AA2.c" file, you can see there are many 0x00 data in const unsigned char array.
      CNLight_30_Light_EXT_AA2.zip

      Is there any way to reduce the data size of the generated when using chinese character?

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