Antialiased font problem

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

  • Antialiased font problem

    Hello!

    I converted a .ttf font with the Font Cvt tool with 4pp antialiasing. I wrote out a text with the textMode GUI_TM_TRANS setting.
    The background is a bmp, converted with the Bmp Cvt tool to .c file. This background also contains the same text which was written with the same font, size, and antialiasing setting.
    In the attached picture you can see the difference. The driver written out text looks much more ugly.
    Does anyone have any advice to solve this issue?
    Images
    • IMG_20141105_114016_s.jpg

      839.2 kB, 700×563, viewed 787 times
  • Hello,

    Please note that converting a BMP file to a palette based .c file may cut a lot of colors. It seems the conversion removed the colors from your bitmap which were generated by the antialiased font edges. It should look fine once you store the .c file in a format including more colors.

    Best regards,
    Adrian
  • Hello!

    I think I was not so exact. So the first line of string is a part of the generated background picture. It looks fine. That text was written to the picture with picture editor software. I converted this png to a true color .c file with the Bmp Cvt tool.
    The second line is with the same font, size, and with aa, written out with GUI_DispStringHCenterAt() function, after I loaded the font.

    Another problem: you can see a lighter bar in line with the second string. Do you know how to eliminate that effect?
  • Hello,

    It seems as if the display controller is not well initialized. I would recommend contacting the manufacturer of the display / display controller for support regarding this.

    Unfortunately I have no idea what could cause the font to be displayed improperly. Could you please provide me with a small sample application showing this behavior, the c file font and your configuration files (GUIConf.*, LCDConf.*)? I would like to reproduce this.

    Best regards,
    Adrian
  • Hello Adrian!

    Thanks for your further investigation. Here is the little source code:

    C Source Code

    1. GUI_Init();
    2. WM_MOTION_Enable(1);
    3. WM_MULTIBUF_Enable(1);
    4. WM_SetCreateFlags(WM_CF_MEMDEV);
    5. WM_Exec();
    6. GUI_SetBkColor(GUI_WHITE);
    7. GUI_SetColor(GUI_BLACK);
    8. GUI_Clear();
    9. extern GUI_CONST_STORAGE GUI_FONT GUI_FontRoboto_light_14pt_aac;
    10. extern GUI_CONST_STORAGE GUI_BITMAP bmSWTS_L_true_color;
    11. GUI_DrawBitmap(&bmSWTS_L_true_color, 0,0);
    12. GUI_SetColor(GUI_WHITE);
    13. GUI_SetTextMode(GUI_TM_TRANS);
    14. GUI_SetFont(&GUI_FontRoboto_light_14pt_aac);
    15. GUI_DispStringHCenterAt("My phone",80,60);
    Display All


    And see attached the font in .c and .ttf format, and the background pic in .c and .png format and the configuration files.
    Files
    • aa_issue.zip

      (174.1 kB, downloaded 524 times, last: )

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

  • Hello Janos,

    Thank you for sending the files. Unfortunately I was not able to reproduce this. I assume this problem is caused by your display driver. GUIDRV_SSD1353 was not implemented by Segger.

    Please understand that I have to ask you to contact ST for that.

    Best regards,
    Adrian