Wiki > Main > CreateFonts (compare)
Difference: CreateFonts (r13 vs. r12)
Rockbox stores fonts in a special format called FNT (see FontFormat for details). If you have a Linux and/or BSD system with an X server you probably already have a font server like xfs. You can use all the fonts available on this font server to create BDF files which you then can convert to FNT format. The procedure is quite easy:
First, make sure you have a font server running. Common ones are xfs, xfs-xtt and xfstt. Usually they can be reached via a UNIX socket. On my Debian system, xfs waits for connections on
apt-get install xfs
The tool to extract arbitrary fonts in BDF format is called
fstobdf -s unix/:7100 -fn -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1 > fixed-12.bdf
convbdf -f fixed-12.bdf
A useful free software program for converting, previewing and editing fonts is FontForge (http://fontforge.sourceforge.net). It supports unicode natively and can generate fonts in many formats including BDF. It can import fonts in TrueType, Postscript (Type 1 - Type 3), SVG and several other formats as well.
To export your font for the use with convbdf, be sure to select File->Generate fonts and choose BDF as output format. Otherwise you will get nasty error messages during conversion.
This is a MS-DOS/Windows batch file which makes use of some free programs to convert any TrueType or OpenType font automatically to the Rockbox FNT format. All you need is to start the command prompt, navigate to the folder containing the convertor and type
This is being updated constantly and I hope to create a GUI soon to do the same job and make it easier to use and configure.
There is a new version in the works. For more information see the forum thread below. I will update this ASAP. -- GeoffStokes - 23 Feb 2007
Currently, you set the font size inside the batch file, but in the future i hope to allow this to be set either in GUI or as a command line argument.
The convertor includes all necessary files in the .zip, and simply needs extraction to a convenient place. Note also that the converted font file is placed in the same folder as the original, so it's best to copy the font file into the directory which the convertor is in FIRST before starting, using a font in C:\Windows\Fonts will NOT work as the file will not be accessible from that folder.
For more information and downloads, see the Rockbox Font Convertor wiki page.
Fonts generally have to be kept small to be usable on the low resolution screens of most devices. As a rough guide, fonts should be kept smaller than the equivalent of 16 pt on a 100 dpi display. Serif fonts tend to distort more than sans serif (or monospace) fonts at low resolutions. Remember that fonts can (and should be) tested in the UiSimulator to make sure they are viewable and not overly distorted.
Note that even though you may be able to rasterize and convert TrueType fonts (like the beautiful Bitstream family), for example by exporting to BDF and then following the above instructions, they'll tend to look ugly when used in Rockbox due to the low resolution. Previewing fonts with
Please also remember that fonts must be released under a GPL-compatible license to be included with Rockbox. BSD and MIT/X11 are among the licenses considered compatible (see gnu.org for legal details). Commercial fonts (such as those included with Windows or various word processing applications) are virtually always unacceptable from a licensing standpoint.
The Xfree86/Xorg server distribution source contains a lot of BDF files. A gallery of a lot of these, converted to Rockbox font format can be found here. There is a problem with some of the larger fonts, where some characters look strange, or don't work at all - if you know what's causing this (BDF files are available for download as well), please contact me (JonasHaeggqvist).
Rockbox support anti-aliased fonts since r29523. The source tree contains the convttf tool which can be used to create anti-aliased .fnt files directly from .ttf fonts.
To create, for example, a 15 point high font with 1 pixel spacing from FreeSans?, type:
tools/convttf -p 15 -c 1 /path/to/FreeSans.ttf
It will create a file named 15-FreeSans.fnt in the current directory.
Please refer to convttf's help output for details and further options.
Sadly enough there are some nice or very useful non-free fonts that can't be published here. We can however publish the convttf settings.
For that the NonFreeConvTTFSettings page has been created. If you have any relevant settings, please add them.
r13 - 19 Jun 2012 - 12:44:36 - SebastianStellingwerffRevision r13 - 19 Jun 2012 - 12:44 - SebastianStellingwerff
Revision r12 - 24 Mar 2011 - 19:42 - DaveHooper
Copyright © by the contributing authors.