From 34ff250eea1c229ab2cb554bae94fe29749b2411 Mon Sep 17 00:00:00 2001 From: LTVA1 <87536432+LTVA1@users.noreply.github.com> Date: Wed, 25 Jan 2023 08:18:32 +0300 Subject: [PATCH] rename to canvas_set_custom_u8g2_font --- applications/debug/example_custom_font/example_custom_font.c | 2 +- applications/services/gui/canvas.c | 2 +- firmware/targets/f7/api_symbols.csv | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/debug/example_custom_font/example_custom_font.c b/applications/debug/example_custom_font/example_custom_font.c index 60890f1d4..51f3ce184 100644 --- a/applications/debug/example_custom_font/example_custom_font.c +++ b/applications/debug/example_custom_font/example_custom_font.c @@ -44,7 +44,7 @@ static void app_draw_callback(Canvas* canvas, void* ctx) { canvas_clear(canvas); - canvas_set_custom_font(canvas, u8g2_font_tom_thumb_4x6_tr); + canvas_set_custom_u8g2_font(canvas, u8g2_font_tom_thumb_4x6_tr); canvas_draw_str(canvas, 0, 6, "This is a tiny custom font"); canvas_draw_str(canvas, 0, 12, "012345.?! ,:;\"\'@#$%"); diff --git a/applications/services/gui/canvas.c b/applications/services/gui/canvas.c index 29d56f34a..18636eced 100644 --- a/applications/services/gui/canvas.c +++ b/applications/services/gui/canvas.c @@ -137,7 +137,7 @@ void canvas_set_font(Canvas* canvas, Font font) { } } -void canvas_set_custom_font(Canvas* canvas, const uint8_t* font) { +void canvas_set_custom_u8g2_font(Canvas* canvas, const uint8_t* font) { furi_assert(canvas); u8g2_SetFontMode(&canvas->fb, 1); u8g2_SetFont(&canvas->fb, font); diff --git a/firmware/targets/f7/api_symbols.csv b/firmware/targets/f7/api_symbols.csv index a802d8706..eea2fe544 100644 --- a/firmware/targets/f7/api_symbols.csv +++ b/firmware/targets/f7/api_symbols.csv @@ -620,7 +620,7 @@ Function,+,canvas_reset,void,Canvas* Function,+,canvas_set_bitmap_mode,void,"Canvas*, _Bool" Function,+,canvas_set_color,void,"Canvas*, Color" Function,+,canvas_set_font,void,"Canvas*, Font" -Function,+,canvas_set_custom_font,void,"Canvas*, const uint8_t*" +Function,+,canvas_set_custom_u8g2_font,void,"Canvas*, const uint8_t*" Function,+,canvas_set_font_direction,void,"Canvas*, CanvasDirection" Function,+,canvas_string_width,uint16_t,"Canvas*, const char*" Function,+,canvas_width,uint8_t,Canvas*