New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add font to U8g2 #1140
Comments
The central tool is bdfconv which converts .bdf into the internal u8g2 format. If you can provide .bdf then I can create the u8g2 fonts. |
I contacted the font creator, and was advised to use this tool. |
You can drag it over comment window to add as attachment. But make sure to zip it first as GitHub limit possible extensions. |
Included a zip that contains the original true type font, the bdf file and a license text. |
I have renamed your bdf file to "dseg7_classic_regular.bdf". If you need multiple files (and/or if you want to see it in u8g2 once) we should define a shortcut for it, like dseg7cr or something like this. This is the u8g2 conversion command:
This is how it looks like: Not sure about the chars >127. Is this intended? You need to tell, which glyphs are required. This is the code, which could be included in your .ino file:
The font name for the setFont command would be |
I played around a little bit with the converter. I restricted the bdf conversion to those glyphs which look like 7-seg chars (
This is the result: And this is the code:
Edit: Hmm.. I think the -m command should be "-m '48-57,65-90,97-122' (90 instead of 92) |
Just for information: bdfconv handling is mentioned in the u8g2 FAQ https://github.com/olikraus/u8g2/blob/master/doc/faq.txt#L233 |
Thank you for you effort. |
Sieht gut aus :-) Ah, yes I can add the fonts to u8g2 if you want... I mean, it is not really required for you project, you can just paste the code into your ino file, but I guess you did this already. You can add the other bdf files here and I will do the conversion. |
Could you be so kind to convert this one as well? |
This is the result. It looks a little bit odd, because some segments are rendered with 1 pixel other with 2 pixel. Maybe you should select a different point size for the vector to bitmap conversion.
|
nice :-) |
Great library (helpdesk included!) |
Is it possible to add this font to the library.
If so, what is the workflow?
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: