From ff129e524a89fddaed7b84a4a5af5928daa97c42 Mon Sep 17 00:00:00 2001 From: Evgeny Stepanischev Date: Thu, 30 Nov 2023 12:38:48 +0300 Subject: [PATCH] Allows you to use UCS-2 in canvas_glyph_width (#3226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * allows you to use UCS-2 in canvas_glyph_width * Sync API Symbols Co-authored-by: あく --- applications/services/gui/canvas.c | 2 +- applications/services/gui/canvas.h | 2 +- targets/f18/api_symbols.csv | 4 ++-- targets/f7/api_symbols.csv | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/applications/services/gui/canvas.c b/applications/services/gui/canvas.c index 85c052853..44adcd939 100644 --- a/applications/services/gui/canvas.c +++ b/applications/services/gui/canvas.c @@ -202,7 +202,7 @@ uint16_t canvas_string_width(Canvas* canvas, const char* str) { return u8g2_GetStrWidth(&canvas->fb, str); } -uint8_t canvas_glyph_width(Canvas* canvas, char symbol) { +uint8_t canvas_glyph_width(Canvas* canvas, uint16_t symbol) { furi_assert(canvas); return u8g2_GetGlyphWidth(&canvas->fb, symbol); } diff --git a/applications/services/gui/canvas.h b/applications/services/gui/canvas.h index f34d02bfb..a369e213b 100644 --- a/applications/services/gui/canvas.h +++ b/applications/services/gui/canvas.h @@ -214,7 +214,7 @@ uint16_t canvas_string_width(Canvas* canvas, const char* str); * * @return width in pixels */ -uint8_t canvas_glyph_width(Canvas* canvas, char symbol); +uint8_t canvas_glyph_width(Canvas* canvas, uint16_t symbol); /** Draw bitmap picture at position defined by x,y. * diff --git a/targets/f18/api_symbols.csv b/targets/f18/api_symbols.csv index d861d8511..7835718de 100644 --- a/targets/f18/api_symbols.csv +++ b/targets/f18/api_symbols.csv @@ -1,5 +1,5 @@ entry,status,name,type,params -Version,+,46.0,, +Version,+,47.0,, Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli_vcp.h,, @@ -633,7 +633,7 @@ Function,+,canvas_draw_str_aligned,void,"Canvas*, uint8_t, uint8_t, Align, Align Function,+,canvas_draw_triangle,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, CanvasDirection" Function,+,canvas_draw_xbm,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*" Function,+,canvas_get_font_params,const CanvasFontParameters*,"const Canvas*, Font" -Function,+,canvas_glyph_width,uint8_t,"Canvas*, char" +Function,+,canvas_glyph_width,uint8_t,"Canvas*, uint16_t" Function,+,canvas_height,uint8_t,const Canvas* Function,+,canvas_invert_color,void,Canvas* Function,+,canvas_reset,void,Canvas* diff --git a/targets/f7/api_symbols.csv b/targets/f7/api_symbols.csv index 9431028ab..f31349f9c 100644 --- a/targets/f7/api_symbols.csv +++ b/targets/f7/api_symbols.csv @@ -1,5 +1,5 @@ entry,status,name,type,params -Version,+,46.0,, +Version,+,47.0,, Header,+,applications/drivers/subghz/cc1101_ext/cc1101_ext_interconnect.h,, Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/cli/cli.h,, @@ -722,7 +722,7 @@ Function,+,canvas_draw_str_aligned,void,"Canvas*, uint8_t, uint8_t, Align, Align Function,+,canvas_draw_triangle,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, CanvasDirection" Function,+,canvas_draw_xbm,void,"Canvas*, uint8_t, uint8_t, uint8_t, uint8_t, const uint8_t*" Function,+,canvas_get_font_params,const CanvasFontParameters*,"const Canvas*, Font" -Function,+,canvas_glyph_width,uint8_t,"Canvas*, char" +Function,+,canvas_glyph_width,uint8_t,"Canvas*, uint16_t" Function,+,canvas_height,uint8_t,const Canvas* Function,+,canvas_invert_color,void,Canvas* Function,+,canvas_reset,void,Canvas*