Font converter - problems with removing unused characters with Pattern file

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

  • Font converter - problems with removing unused characters with Pattern file

    Hi
    I'm using FontCvtST.exe V5.32.
    I'm trying to reduce characters in Chinese font HZK12.C with Disable all characters and then load sample Pattern file with only four characters.
    Pattern file is created with notepad and saved as unicode txt file.
    When I try to read Pattern file (with only four characters), I get error message : charcater codes not found in current font : FFFE , FB7C , DF7E , C253.
    I think that this codes are not correct and all needed characters are in font file, because when I load complete font into microcontroller I get correct Chinese text on LCD.
    I use U2C.exe to convert Chinese text to C file for displaying text on lcd.

    I need to reduce flash size, because I'm running out of space on STM32f407

    Any suggestions are appreciated !

    Thanks
    Files
  • Still waiting answer from Segger !
    In attachment is screenshot with Error when loading pattern file.
    Used font is unifont-9.0.06.bdf from unifoundry.com/unifont.html
    All needed characters are in these font, character 5F00 is part of font and is red marked.
    When I try to load I get message that among others also character 5F00 is not part of current font.

    Please help me solve this problem, I have so many characters to select and I can't do this manualy !
    Images
    • emWin Reading Pattern file - ERROR.png

      54.38 kB, 723×496, viewed 642 times
  • Hi,

    I gave it a try (FontCvtST V5.32 and your pattern file) and it works without any issues.

    The only difference is that I have used the *.ttf version of this font (also I'm not sure how to use the *.bdf file under Windows).

    EDIT:
    I have to correct myself. I forgot that the FontCvt is able to load *.bdf files.
    I checked again and it seems something is not working properly. I will check that.

    For now you might use the *.ttf version of the font.

    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.
  • OK, it works now when loading *.ttf file.
    It does not work correct when load *.c or *.bdf files and this will be very useful.
    Problem when loading *.ttf file is that some characters are distorted in low pixel resolution.

    Regards

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

  • Hi ToneL

    I bothered with the same issue and I solved it for me:
    I found out, that my pattern file MUST BE in "UCS2 Little(!) Endian" format.
    With UTF-8 or UCS2-big-endian I had the same problem.
    Please convert your pattern file and try again. (For such stuff I use free notepad++ editor.)
    Hope this helps you and Segger to improve FontConverter ;)

    Best regards
    Matz
  • Ristriction:
    I just realized that it only works sufficient when loading a .c font file and then read a (UCS2 little endian) pattern file (I use a .txt pattern file).
    When I load the corresponding .xbf font file the issue is still there. :( .
    Hope Segger can fix this.
    Regards.

    EDIT: I just recognized that you already uses an usc2 little endian pattern .txt file. Sorry, then my suggestion will not help. Seems that the problem depends on several factors. ?(

    The post was edited 1 time, last by XT-Matz ().

  • One more bug with Font Converter ST V5.32.

    TEST:
    -Load file unifont-9.0.06.bdf into font converter
    -Disable all characters (for quicker test)
    -Enable one character for example 'A'
    -Save into 'C' file
    -Open 'C' file with editor

    Generated file is not correct as seen in Font Converter.
    On the right side of character there is one added vertical line so on right side of character is double vertical line.
    If I reopen 'C' file and add vertical line on the right side and save again into 'C' file then generated file is correct.

    When I load unifont-9.0.06.bdf there are all characters without empty column on left or right side.
    It will be very useful in my case if you can add command for example : Edit->Insert or Delete->Right or Left Column in all characters in one command

    Best regards
    Images
    • emWin_(ST)V532_Font_Convert - BUG.png

      29.4 kB, 908×578, viewed 697 times

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

  • XT-Matz thanks, you are right, when loading 'C' file pattern file loading works correct.

    Solution for Problem with pattern file load with loaded BDF font file:

    -Load BDF File
    -Save As 'C' file
    -Load saved 'C' file
    -Edit->Disable all characters
    -Edit->Read pattern file
    -Save As 'C' file

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

  • Hi,

    I've checked the BDF-font unifont-9.0.06.bdf. It does not contain the characters 0xFFFE and 0xDF7E.

    The problem with not finding existing codepoints immediately after reading a BDF file is now fixed.

    Thanks for the hint.

    Best regards,
    Jörg
    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.
  • OK, thanks for this solution.
    Can you please check another bug with character width, described by me on 25.February 2017, three posts above.
    Where can I get new fixed version of FontCvtST ?

    Best regards
    Anton