How do you show a degree symbol?

Hi,

I was wondering how to get a degree symbol to appear in LVGL.

Ive tried:
normal degree:
lv_table_set_cell_value(sensorTable, 1, 1, “20.25ºC”);

bodmer degree symbol replacement:
lv_table_set_cell_value(sensorTable, 1, 1, “20.25`C”);

edit:
I also tried:
lv_table_set_cell_value(sensorTable, 1, 1, “20.25°C”);

based on the degree symbol from:

but i get nothing.

Any ideas?

Thanks
Alex

As far as I know the degree symbol is outside the basic ASCII range (0x20-0x7F). You need to add it to the converted font.

Ah, in which case can you tell me what the default font, size and BPP is for the night theme? I’ll need to create a font specifically for writing out my temps. Ive tried a number of different roboto ones but they dont look as good as the default one…

Ive tried to figure it out by looking at the source but must admit i’m getting out of my depth on that one…

Thanks
Alex

The original Roboto is here: https://github.com/littlevgl/lvgl/tree/master/scripts/built_in_font

I’m pretty sure each of the 4 builtin Roboto fonts were converted with 4BPP, and you can figure out their size from their name.

Themes do not choose the default font; you do (in lv_conf.h).

Thank you for the pointer,

The answer is 4BPP, Size 16 but the crucial part is “Roboto Regular”. I tried most of the others and didn’t notice the “regular” option…

Thanks for the pointer and help
Alex