Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/tte/tte_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ POINT16 tte_get_text_size(const char *str)
int charW, charH= tc->font->charH;

int x=0, width= 12, height= charH;
int ch;
uint ch;

while( (ch= *str++) != 0 )
{
Expand Down Expand Up @@ -721,6 +721,11 @@ POINT16 tte_get_text_size(const char *str)

// --- Normal char ---
default:

// Check for UTF8 code
if(ch>=0x80)
ch= utf8_decode_char(str-1, &str);

charW= tc->font->cellW;
if(x+charW > tc->marginRight)
{
Expand Down