Closed gpfreund closed 3 years ago
@gpfreund Hello,
Can you please share opensans.ttf file? I don't have that one.
It seems, I know what is the root cause.
Please don't use non-printable chars ascii codes in the generator.
Instead of .\fontgenerator.py --ttf opensans.ttf -s 16 -g 0 127 -f new -d > output.cpp
, please use .\fontgenerator.py --ttf opensans.ttf -s 16 -g 32 127 -f new -d > output.cpp
I've also did the fix to the font generator to validate chars, when generating output c-file.
Hi, thanks for the quick response. The Open Sans file is attached (it's really Open Sans Normal). The whole series is here: Open Sans . opensans.zip
The issue itself is fixed - in record time! Very much appreciated! The only other thing I noted is that there when inverting the text, there is a single black pixel separating the characters and it only inverts the extend of the actual character. I would expect that it inverts the maximum height of the character (including the area below the base line). Not a big deal for us but just FYI.
Thanks for writing and maintaining this great library - much appreciated. I did run into one problem: I generated a font from OpenSans and used printFixed() to display some text. However and space (0x20) character renders as previous character in the string. For example "Bold text" renders as "Bolddtext".
1) Generating the font
.\fontgenerator.py --ttf opensans.ttf -s 16 -g 0 127 -f new -d > output.cpp
2) Initializing the OLED
DisplaySSD1327_128x128_I2C display(-1);
3) Render the text (based on the example code)
Result: