Ucglib uses BDF fonts as a source. The basic process to convert a typical font file for use in Ucglib is:
bdconfto convert the BDF format to C.
Details are provided below.
fontforge are available in many Linux distributions.
You will probably have to build
bdfconv yourself. Download the Ucglib repository, move into
This will build a
bdfconv executable. Put that executable or a symbolic link to it into your
$ otf2bdf -v -n -r 72 -p 71 -l '32 48_57 65_90' -c M -o filename.bdf filename.otf
gbdfed also can import and convert fonts, but the monospace/proportional setting seems to be wonky.
fontforge may be another option.
View the result using
Once the font is in BDF format, you can use
fontforge to edit it, which might include removing unused characters or tweaking bitmaps.
$ bdfconv -v -b 2 -f 0 -n fontname -d image.tga -o filename.c filename.bdf
Note: There seems to be an upper limit to the size of the font. What is it?
src/clib/ucg_pixel_font_data.c— making sure to remove the redundant
externentry for the above variable to