FontConverter: Loading XBF-File corrupts negative X-Positions

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

  • FontConverter: Loading XBF-File corrupts negative X-Positions

    Hi all,

    I have an abnormal behaviour with FontConverter 5.28:
    If I load an XBF File with some characters having negative X-Position, then the value of the X-Position is misinterpreted.
    Value of -1 is interpreted as 65535
    Value of -2 is interpreted as 65534
    etc.
    Seems that FontConverter has an signed/unsigend issue.

    Problem:
    If this Font is saved as C-Code, this code will lead to an compiler warning or error (trying to convert 65535 to I8 ).


    You can reproduce this with FontConverter:

    - File | New | Extended 16 bit Unicode | Arial Standard 24 Pixels (I used Default Arial from Windows 10)
    - Then have a look to some characters and keep the vaules in mind:
    0x019D: X-Position = -1
    0x0300: X-Position = -5
    0x0303: X-Position = -10
    - Save the font as <name>.XBF file
    - Then Load this <name>.XBF file again
    - Then have a look to same characters
    0x019D: X-Position = 65535
    0x0300: X-Position = 65531
    0x0303: X-Position = 65526


    Can one say wether this behaviour is fixed in the actual version (5.34)?

    Best regards
    Matz
  • Hi Matz,

    thanks for the hint. You are right, we lost a sign when loading a xbf file.
    It shouldn't be a problem when displaying the font with emWin.

    We have fixed this and it will be present in the next release of emWin and with this also in the FontConverter.

    Best 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,

    you promised:

    SEGGER - Schoenen wrote:

    You are right, we lost a sign when loading a xbf file
    We have fixed this and it will be present in the next release of emWin and with this also in the FontConverter.
    Sorry, but unfortunately FontConverter V5.40 is still corrupting negative X-position in the same manner when loading XBF File:
    Value of -1 is interpreted as 65535
    Value of -2 is interpreted as 65534
    etc.
    This gives unexpected results when generating a C-File.

    Do you have an idea from which version on this bug will be fixed?
    Best regards
    Matz