olikraus / U8g2_for_Adafruit_GFX

Add U8g2 fonts to any Adafruit GFX based graphics library.
Other
117 stars 35 forks source link

Hungarian characters #41

Open tutus964 opened 1 year ago

tutus964 commented 1 year ago

Hi Olikraus,

Thanks for the development! The Hungarian characters appear very nicely on the 0.91 Oled display, except for two: ő and ű I'm using this character set: u8g2_font_5x7_tf and I see that it has ő and ű. However, it does not appear on the display. I use your sample program: Hello_Adafruit_SSD1306.ino

Thank you very much in advance for your help!

István

olikraus commented 1 year ago

Fonts are taken from the sister project u8g2: https://github.com/olikraus/u8g2/wiki/fntgrpx11#5x7 (overview here: https://github.com/olikraus/u8g2/wiki/fntgrp)

To reduce memory consumption, the fonts may not include all required chars. Especially the "f" (last char of the font name) means, that only unicode between 0 and 255 are included.

The mentiond chars ő and ű have unicodes 337 and 369, so they are NOT included in an font which has a "f" at the end. However they should be included in fonts which have an "e" at the end, like the 6x12 font from here: https://github.com/olikraus/u8g2/wiki/fntgrpx11#6x12

The problem is, that often such chars are not included in the original source, so it might be the case that ő and ű are not included in the original X11 font 5x7. As a consequence u8g2 is can not generate the corresponding font with an "e" at the end.

The last char of the font name is described here: https://github.com/olikraus/u8g2/wiki/fntlist8#u8g2-font-names (but i just see, that "e" is missing in the table)

tutus964 commented 1 year ago

Thanks for the quick response. I'm trying to figure something out.