You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you know I've been porting Adafruit's Font code to Java for the Builder and also porting your alignment code.
Having completed the port for reading and writing these fonts I found what I think is a small bug within the GUIslice API gslc_DrawTxtBase() routine.
I have attached a small sample program that shows the alignment that I believe is incorrect. I have tried this program with various GFX fonts and sizes and they all behave the same.
I think the problem is within gslc_DrawTxtBase() routine line number 2982:
nTxtX += nTxtOffsetX;
If you modify this to
nTxtX -= nTxtOffsetX;
I believe you will find the text lining up correctly. Note that these nTxtOffsets are only used by GFX fonts. The glcd built-in fonts set these offsets to zeroes.
As you know I've been porting Adafruit's Font code to Java for the Builder and also porting your alignment code.
Having completed the port for reading and writing these fonts I found what I think is a small bug within the GUIslice API gslc_DrawTxtBase() routine.
I have attached a small sample program that shows the alignment that I believe is incorrect. I have tried this program with various GFX fonts and sizes and they all behave the same.
I think the problem is within gslc_DrawTxtBase() routine line number 2982:
If you modify this to
I believe you will find the text lining up correctly. Note that these nTxtOffsets are only used by GFX fonts. The glcd built-in fonts set these offsets to zeroes.
Paul--
test-align.zip
The text was updated successfully, but these errors were encountered: