Skip to content

Commit 5b90289

Browse files
author
Jamie C. Driver
committed
ui: fix issue displaying text using fixed-width fonts
Missed from tft port in 6217e66
1 parent 7a8de01 commit 5b90289

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main/display.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,9 @@ void display_print_in_area(const char* st, int x, int y, dispWin_t areaWin, bool
813813
TFT_X = x;
814814
TFT_Y = y;
815815

816+
// for non-proportional fonts, char width is the same for all chars
817+
// for proportional fonts, this value is calculated as each char is printed
818+
tmpw = cfont.x_size;
816819
int tmph = cfont.y_size;
817820

818821
if ((TFT_Y + tmph - 1) > areaWin.y2) {

0 commit comments

Comments
 (0)