Skip to content

Commit

Permalink
Allows you to use UCS-2 in canvas_glyph_width (#3226)
Browse files Browse the repository at this point in the history
* allows you to use UCS-2 in canvas_glyph_width
* Sync API Symbols

Co-authored-by: あく <[email protected]>
  • Loading branch information
bolknote and skotopes authored Nov 30, 2023
1 parent f9101d8 commit ff129e5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion applications/services/gui/canvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion applications/services/gui/canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
4 changes: 2 additions & 2 deletions targets/f18/api_symbols.csv
Original file line number Diff line number Diff line change
@@ -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,,
Expand Down Expand Up @@ -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*
Expand Down
4 changes: 2 additions & 2 deletions targets/f7/api_symbols.csv
Original file line number Diff line number Diff line change
@@ -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,,
Expand Down Expand Up @@ -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*
Expand Down

0 comments on commit ff129e5

Please sign in to comment.