Merge branch 'ofw_dev' into dev

This commit is contained in:
MX
2023-12-22 22:14:20 +03:00
4 changed files with 40 additions and 68 deletions

View File

@@ -158,7 +158,7 @@ void canvas_draw_str(Canvas* canvas, uint8_t x, uint8_t y, const char* str) {
if(!str) return;
x += canvas->offset_x;
y += canvas->offset_y;
u8g2_DrawUTF8(&canvas->fb, x, y, str);
u8g2_DrawStr(&canvas->fb, x, y, str);
}
void canvas_draw_str_aligned(
@@ -177,10 +177,10 @@ void canvas_draw_str_aligned(
case AlignLeft:
break;
case AlignRight:
x -= u8g2_GetUTF8Width(&canvas->fb, str);
x -= u8g2_GetStrWidth(&canvas->fb, str);
break;
case AlignCenter:
x -= (u8g2_GetUTF8Width(&canvas->fb, str) / 2);
x -= (u8g2_GetStrWidth(&canvas->fb, str) / 2);
break;
default:
furi_crash();
@@ -201,13 +201,13 @@ void canvas_draw_str_aligned(
break;
}
u8g2_DrawUTF8(&canvas->fb, x, y, str);
u8g2_DrawStr(&canvas->fb, x, y, str);
}
uint16_t canvas_string_width(Canvas* canvas, const char* str) {
furi_assert(canvas);
if(!str) return 0;
return u8g2_GetUTF8Width(&canvas->fb, str);
return u8g2_GetStrWidth(&canvas->fb, str);
}
uint8_t canvas_glyph_width(Canvas* canvas, uint16_t symbol) {
@@ -329,10 +329,10 @@ static void canvas_draw_u8g2_bitmap_int(
void canvas_draw_u8g2_bitmap(
u8g2_t* u8g2,
uint8_t x,
uint8_t y,
uint8_t w,
uint8_t h,
u8g2_uint_t x,
u8g2_uint_t y,
u8g2_uint_t w,
u8g2_uint_t h,
const uint8_t* bitmap,
IconRotation rotation) {
u8g2_uint_t blen;

View File

@@ -100,7 +100,7 @@ void canvas_draw_u8g2_bitmap(
uint8_t width,
uint8_t height,
const uint8_t* bitmap,
IconRotation rotation);
uint8_t rotation);
#ifdef __cplusplus
}