|
|
Wiki > Main > CreateFonts (compare)
|
Difference: CreateFonts (r11 vs. r10)How To Easily Create Font filesRockbox 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 The Anyway, if you have created one or more BDF files, you can convert them with convbdf -f fixed-12.bdf where obviously FontForgeA 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. Rockbox Font ConvertorThis 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 makefont [fontname] 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. If you already have a BDF file, simply use convbdf. You can compile it from source or obtain the binary from RockboxFontConvertor#Included_Applications. For more information and downloads, see the Rockbox Font Convertor wiki page. Font selectionFonts 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), they'll tend to look ugly when used in Rockbox due to the low resolution and because we doesn't support greyscale anti-aliasing. 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. X fonts galleryThe 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). Anti-Aliased fontsRockbox 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 confttf's convttf's help output for details and further options. r13 - 19 Jun 2012 - 12:44:36 - SebastianStellingwerff
Revision r11 - 24 Mar 2011 - 04:44 - JustinHanniganRevision r10 - 05 Mar 2011 - 21:21 - ThomasMartitz Copyright © by the contributing authors.
|