Hi,
Recently we switched from using fonts in C-file format to using XBF fonts, because we ran out of code memory.
Since this change we have an issue, that right or center aligned text is sometimes displayed at the wrong horizontal offset.
This problem occurs when using the GUI_DispStringAt function, but also widgets (like buttons) have this issue sometimes. The weird thing is that most of the time the string is displayed correct, but occasionally it looks like it's shifted to the left. Sometimes it's only a few pixels, other times it's shifted the number of pixels of the string to be displayed. And we don't really have a reproduction scenario, so it's very hard to track.
I attached an image which shows the problem. The bottom line shows the
intended situation, the top line shows the problem. The weird thing is that when the string
is displayed at the wrong offset, next time it draws it at the correct
offset. Because we don't clear
the whole area when the string is updated (but only the part where it
should display the string), we see the string twice on the display.

When we change the GUI_SetFont to use the C-file instead of the XBF file (without changing any other code), we don't see this problem. So it seems that it has something to do with the XBF fonts.
Has anyone seen this problem before?
Thanks in advance.
Recently we switched from using fonts in C-file format to using XBF fonts, because we ran out of code memory.
Since this change we have an issue, that right or center aligned text is sometimes displayed at the wrong horizontal offset.
This problem occurs when using the GUI_DispStringAt function, but also widgets (like buttons) have this issue sometimes. The weird thing is that most of the time the string is displayed correct, but occasionally it looks like it's shifted to the left. Sometimes it's only a few pixels, other times it's shifted the number of pixels of the string to be displayed. And we don't really have a reproduction scenario, so it's very hard to track.
I attached an image which shows the problem. The bottom line shows the
intended situation, the top line shows the problem. The weird thing is that when the string
is displayed at the wrong offset, next time it draws it at the correct
offset. Because we don't clear
the whole area when the string is updated (but only the part where it
should display the string), we see the string twice on the display.
When we change the GUI_SetFont to use the C-file instead of the XBF file (without changing any other code), we don't see this problem. So it seems that it has something to do with the XBF fonts.
Has anyone seen this problem before?
Thanks in advance.