Don't include the spacing after the final letter when measuring text

pull/1051/head
Pete Favelle 2025-01-18 10:51:22 +00:00
rodzic aa1e3f18b7
commit 6628efed8a
1 zmienionych plików z 7 dodań i 1 usunięć

Wyświetl plik

@ -39,6 +39,12 @@ namespace bitmap {
text_width += letter_spacing * scale;
codepage = unicode_sorta::PAGE_195; // Reset back to default
}
// Do not include the spacing on the final character
if (text_width>0) {
text_width -= letter_spacing * scale;
}
return text_width;
}
@ -230,4 +236,4 @@ namespace bitmap {
i = next_break += 1;
}
}
}
}