olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.17k stars 1.05k forks source link

(Own) 7segment font [NotWorking] #704

Closed MrAntza99 closed 6 years ago

MrAntza99 commented 6 years ago

Hi, I have been tried make own font two days and I made it but cant understand how to apply it in arduino?

Also I tried premade font what you have on library but its not working u8g2.setFont(u8g2_font_7Segments_26x42_mn); ^this not work, why? it doenst recognize it.

I made font with Fony, I have BFF-file etc. I tried convert it to .c code but cant do it.

Any simple help? Something little what I just forgot there? (Ps. So I readed a lot of topics and pages from you and others but didnt find solution)

OLED_Clock_custom.zip 7SEGMENT FONT.zip

olikraus commented 6 years ago

Also I tried premade font what you have on library but its not working u8g2.setFont(u8g2_font_7Segments_26x42_mn); ^this not work, why? it doenst recognize it.

The font is here: https://github.com/olikraus/u8g2/blob/master/csrc/u8g2.h#L1224

What exactly is the error message? Do you use the latest u8g2 version?

Any simple help?

Here: https://github.com/olikraus/u8g2/blob/master/doc/faq.txt#L204

MrAntza99 commented 6 years ago

Ahh.. U8G2 needed updates etc..

BUT I dont have any knowledge still how to add that own font, I tried launch yours bdfconv.exe but it just closed itselfs in same moment.. So how/where to use this code?

Q: Which commandline options are required for bdfconv? A: "bdfconv -f 1 -m '32-255' -n fontname -o myfont.c myfont.bdf" "-f 1" generates a u8g2 font. "-m '32-255'" selects unicode 32 to 255. On Windows, please use double quotes: -m "32-255" "-n fontname": This is the name of the font in C/C++/Ino files. "-o myfont.c": The font array will be stored in this file. "myfont.bdf": The input file with the font data (bdf format).

olikraus commented 6 years ago

bdfconv is a commandline tool. You need to execute bdfconv.exe from "cmd.exe": You need to start cmd.exe first.

Maybe this helps:

http://www.codejacked.com/a-beginners-guide-to-the-command-prompt/

Once you are able to work with the command prompt, you can start bdfconv with the mentioned arguments. This will finally generate a file (myfont.c in the example above) which has to be pasted into your .ino file.

olikraus commented 6 years ago

feel free to reopen, if required...