UTF8 support and/or wiki entries on U8G2 support #588
Replies: 3 comments 1 reply
-
you can refer to UTF8 example |
Beta Was this translation helpful? Give feedback.
-
Ok so i dug some more and thank you for that. So im looking at the example, which is using unicode, but, how would i specifically declare a unicode character? I am using this font from u8g2: https://github.com/olikraus/u8g2/wiki/fntpic/u8g2_font_9x15_t_symbols.png And want to use some of the symbols there. How would i "set" them in a gfx->println()? For example, i want to try to use the degree C symbol. Its 2103. How do i specify 2103 in the println? |
Beta Was this translation helpful? Give feedback.
-
I actually got chatGPT to help. You could include this in your examples if you want to print custom code symbols from the u8g2 library. in the main code include this: (2103 is an example glyph) uint32_t codepoint = 0x2103; which will create a UTF encoded char array that can be sent to the print function overload. This is the function that will convert a codepoint from one of the many many custom font faces that u8g2 supports so that any custom font glyph can be selected.
|
Beta Was this translation helpful? Give feedback.
-
I have loaded up a symbol font with u8g2, and it has fonts way up in the 2000+ range. Of course a char is limited to 0-254. How do i access those upper glyphs?
Beta Was this translation helpful? Give feedback.
All reactions