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…
Understood. My details about what to include when creating a custom font is because all of the fonts I am using in firmware are custom, due to limitations in program space. I am making custom fonts to eliminate the character ranges I don’t need. Of course if one is using the built-in fonts, this is not needed. Thank you for pointing out my omission of this detail.
Postscript: Even more reliable (where you don’t have to worry about the file encoding) is this:
sprintf(buffer, "%d \xC2\xB0" "C", degrees);
(The “C” at the end has to be separate, otherwise the compiler will try to interpret “…\B0C” as a 3-digit hex value.) The compiler (for C programmers not already familiar with this) joins the 2 as a single NUL-terminated string.
It sounds like you’re encountering an issue with displaying the degree symbol in LVGL. To ensure the degree symbol appears correctly, make sure the font you’re using in LVGL includes the degree symbol (°). Here’s a potential solution:
The \xB0 represents the degree symbol in ASCII encoding, which should work if your font supports it. If the problem persists, you might need to ensure that the font used in your LVGL project supports extended ASCII characters, or try using an alternative font that includes the degree symbol. Check our website for fake diplomas.