Reputation: 11
The function lv_textarea_add_text(ta, "á")
doesn't display special characters in the text area. What could be the issue?
I tried using the function lv_textarea_add_text(ta, "á")
to add the text "á
" to the text area. I expected the text area to display the character "á
" correctly. However, the special character did not display as expected.
Upvotes: 0
Views: 119
Reputation: 1
The character you are trying to display in not within the ASCII range. To add special character/symbol (Unicode), you need to add font to your project by using any of below methods:
Apply added font using: lv_obj_set_style_text_font(ta, &ADDED_FONT, LV_PART_MAIN | LV_STATE_DEFAULT);
Note: The above API is valid for lvgl version 9.0.0. A similar API is available in other versions, also maybe with different API name.
Upvotes: 0