Open mrbbp opened 7 years ago
This is one of the reasons, why i stopped working on u8glib and created u8g2 instead: U8g2 support UTF-8
I tried your example with the u8g2_font_tom_thumb_4x6_mf and the u8g2_font_5x7_mf but both did not print the degree symbol nor the square exponent symbol.
n5110.setFont(u8g2_font_tom_thumb_4x6_mf); n5110.setCursor( 20,30 ) ; n5110.print( "I²C @ 27°" ) ;
Did you enable UTF-8 for the print command?
https://github.com/olikraus/u8g2/wiki/u8g2reference#enableutf8print
Thanks for the very quick answer. I found that the problem came from the vsvim editor I use with visual studio. If I use the arduino IDE the UTF characters are coded correctly and show up on my display. Obviously there is some setting wrong which sets the character encoding in vsvim. Thanks for your great library.
Yes, the IDE must generate correct UTF-8 code.
aside from its xx_mf name the u8g2_font_tom_thumb_4x6_mf does not produce a degree or a square symbol though. I was looking for a small font as the nokia 5110 only has 84x48 dots. I think I can use a mixture of fonts though for my purpose.
the degree sign and "²" are both included:
Hello, i'm french and i use extended ascii char a,e,i,o,u with accents and some ligature œ,æ or ç. How to add char to font with more chars?