mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 10:18:35 -07:00
Merge branch 'ofw-dev' into dev
This commit is contained in:
@@ -236,11 +236,11 @@ static size_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(len_px > px_left) {
|
if(len_px > px_left) {
|
||||||
uint8_t excess_symbols_approximately =
|
size_t excess_symbols_approximately =
|
||||||
roundf((float)(len_px - px_left) / ((float)len_px / (float)text_size));
|
ceilf((float)(len_px - px_left) / ((float)len_px / (float)text_size));
|
||||||
// reduce to 5 to be sure dash fit, and next line will be at least 5 symbols long
|
// reduce to 5 to be sure dash fit, and next line will be at least 5 symbols long
|
||||||
if(excess_symbols_approximately > 0) {
|
if(excess_symbols_approximately > 0) {
|
||||||
excess_symbols_approximately = MAX(excess_symbols_approximately, 5);
|
excess_symbols_approximately = MAX(excess_symbols_approximately, 5u);
|
||||||
result = text_size - excess_symbols_approximately - 1;
|
result = text_size - excess_symbols_approximately - 1;
|
||||||
} else {
|
} else {
|
||||||
result = text_size;
|
result = text_size;
|
||||||
|
|||||||
Reference in New Issue
Block a user