Use existing Chinese or Japanese characters bdf file and remove unwanted characters to reduce the font data size #2470
-
Hi, I am currently working on project which uses 128x32 SSD1312 OLED display and I need to display UI menus in three different languages, English, Chinese and Japanese. Since I only need a few limited number of characters as I need to display only some user modes (words in different languages but the numbers will still be used English characters) and these wordings will also be fixed, is there a way to use the existing Chinese or Japanese font bdf files and remove unnesscessary characters. Then convert this into .c file to reduce the font data size much more. Or should I just use a fixed bitmap full-screen buffer image for each menu for these languages? Apology for the dumb question as I don't understand much about how this font mapping is working and I'm still learning 😅🙏. Thanks so much in advance and your suggestion will be much appreciated... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, I just realized one thing that I actually need the fonts data since I am going to use the muimanual menu. So I got only one option and that is to create a custom fonts data (remove unwanted character from existing bdf files and create a new font data). How should I do this? 😊🙏 |
Beta Was this translation helpful? Give feedback.
-
I suggest to create your own custom font, with the u8g2 bdfconv font tool. To use that tool you need the font sources. More information on the conversion is available here: Lines 255 to 288 in dc9fc73 |
Beta Was this translation helpful? Give feedback.
I suggest to create your own custom font, with the u8g2 bdfconv font tool. To use that tool you need the font sources.
I personally suggest to use .bdf as a font source, they are available here: https://github.com/olikraus/u8g2/tree/master/tools/font/bdf
More information on the conversion is available here:
u8g2/doc/faq.txt
Lines 255 to 288 in dc9fc73