GUI_IsInFont() not working correctly for XBF Fonts

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

  • GUI_IsInFont() not working correctly for XBF Fonts

    Hello,

    I have an issue with the GUI_IsInFont() function. As I understand the documentation, it should return 0 if and only if a given character is not present in the given font. However, for XBF fonts I've made the following observations:
    1. If the char is available in the font, the function returns 1 -> OK
    2. If the code of the char is between the code of the first char in the font and that of the last char in the font, and the char is not available in the font, the function returns 0 -> OK
    3. If the code of the char is smaller than that of the first char in the font or larger than that of the last char in the font, the function returns 1 -> WRONG

    We have a source code license and I can see that the behaviour of (3) is explicity defined in GUI_XBF__IsInFont(). However, I think it should return 0 in that case because the char is not in the font. Can you please have a look at this?

    Tobias
  • Hello Tobias,

    I just fixed the problem. In in the 3rd case you described the XBF related ..._IsInFont()-function returns an improper value which causes the function GUI_IsInFont() to return 1 instead of 0. This will be fixed in the next emWin version of course.

    I am sorry for the inconveniences. If you have any further questions, please let me know.

    Best regards,
    Adrian