Ucglib_Arduino icon indicating copy to clipboard operation
Ucglib_Arduino copied to clipboard

Own font from bdf

Open hevet opened this issue 6 years ago • 5 comments

I have modified the bdf font. What command through bdfconv to generate a font from a bdf file to c format, and how do I correctly add it to the program code in Arduino IDE? Thanks

hevet avatar Nov 12 '19 06:11 hevet

I think the commands are all listed here: https://github.com/olikraus/ucglib/blob/master/tools/font/build/do_fonts_v2.sh

You can just copy the generated .c code to your .ino file.

olikraus avatar Nov 13 '19 15:11 olikraus

Thanks for the answer. Can you write me where to paste these commands in cmd or something else? I have windows.

hevet avatar Nov 13 '19 16:11 hevet

Can you write me where to paste these commands in cmd or something else? You have to first build your own executable for bdfconv out of the source from here: https://github.com/olikraus/ucglib/tree/master/tools/font/bdfconv

With bdfconv available you can run the command, which will look like this:

bdfconv -b 0 -m '32-127>32' cu12.bdf -n ucg_font_cu12 -o cu12.c  

The result will be a file called "cu12.c". You can just copy the content of that file directly in your .ino file and use the above name "ucg_font_cu12" (-n option) as argument for the setFont command.

olikraus avatar Nov 14 '19 08:11 olikraus

You can just copy the content of that file directly in your .ino file and use the above name "ucg_font_cu12" (-n option) as argument for the setFont command.

What does it mean to add? I added the code and it doesn't work. Are there instructions on how to do this correctly?

hhhh And I couldn't find instructions for bdfconv.exe anywhere. Is there a command description?

Sergio-tix avatar Jul 23 '22 20:07 Sergio-tix

You need to remove the include statement (i do not know from where it comes from).

Help on bdfconv.exe is printed if called without arguments in a cmd.exe shell.

Please also note, that work on ucglib has been halted.

olikraus avatar Jul 24 '22 06:07 olikraus