Fonts

From wikiPodLinux

For information about non-modular podzilla's old font system, see Fonts (legacy).

Various iPodLinux applications support fonts in a common location. Different types of fonts are supported; they work best on different types of iPods.

Table of contents

Font Types

PCF / Microwindows .FNT

These are grouped together because they are very similar. Note that compressed PCFs are not supported at this time.

These are bitmapped fonts, one color only but can be drawn in any color the application wishes, and they cannot be anti-aliased. You can convert BDF to PCF with the program bdftopcf; Microwindows .FNT files can be generated with convbdf in the Nano-X source tree. You can get this app here: Linux x86 bin, Source

SFont fonts

These might be described as "pixmapped fonts" — a PNG file with a little bit of additional info in it. Thus, if you want every character could be a different color; but as such there's no way for the application using the fonts to change their color. As such, you have two create two font files: one with "white" text and one with "black" text. To make one, draw with a graphics program the string

! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ `
a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~

(all on one line) in the font of your choice. Use antialiasing if you want it. Save this PNG file as fontname.png; then invert it and save as fontname-i.png.

Next, you have to put magenta pixels (RGB 255/0/255) everywhere in the top line between the characters. If you use Google (http://www.google.com/search?q=sfontmaker), you'll find an application to do this for you; it sometimes messes up the double quote, which can easily be fixed manually. The two PNG files are your font.

TrueType fonts

Not yet implemented, but support would be simple. Questionable whether we even should, though. Would be slow.

TrueType fonts can be copied into the iPod's fonts directory and should work as expected, except much more slowly.

Adding the fonts

Fonts are stored on the iPod in the folder /usr/share/fonts; you can have multiple types of font for the same font, but they must have the same basename (part before the extension). You also must make a fonts.lst file; this is composed of a bunch of lines, each describing a font you have. Comments start with # and are allowed. See below for the format of each line.

fonts.lst format

[filename]             (Font Name)     <size>      {ofs}    # {ofs} optional

Each line has four fields, each delimited by a unique delimiter. As such, they can occur in any order.

  • [file]file should be the basename of the font file to use for this font. On color iPods, the search order will be SFont–TrueType–FNT–PCF; on 2bpp iPods, only FNT and PCF will be searched for.
  • (Name)Name is the name of the font, to be used for display purposes (e.g. the settings menu). It may contain spaces and pretty much any other funny characters you want (except [{(<>)}]).
  • <size>size is the point size of the font described by the line. Use 0 for scalable fonts, or fonts that should pretend to be scalable. This size is used only in selecting a font, and does not necessarily need to be accurate. For instance, if you want a small font to be used when a 12-point font would otherwise be used, you can set its size to 12.
  • {ofs} — This one's rather complicated. Some fonts have a rather screwed-up bounding box, so they appear off-center vertically. You can use this to compensate for that. ofs should be the number of pixels to shove characters of the font down whenever they are drawn. You must include the sign (+ or –).

Example fonts.lst

# [file]               (Name)	       <size>    [ {offset} ]
[6x12]                 (6x12 utf8)     <12>
[burrito]              (Burrito)       <11>
[chicago]              (Chicago)       <12>        {+2}

Premade Fonts

Rockbox fonts (http://www.rockbox.org/fonts/)

Jonrelay's .fnt collection

BleuLlama's .fnt selection (http://patsy.cis.rit.edu/Image/font/ipod/yorglefonts.tar.gz)

Espy Sans font

Chixa font

Retrieved from "http://ipodlinux.org/Fonts"
Navigation



  • Google Search (http://www.google.com/custom?sa=Google+Search&cof=S%3Ahttp%3A%2F%2Fwww.ipodlinux.org%3BVLC%3Apurple%3BAH%3Acenter%3BBGC%3Awhite%3BLH%3A141%3BLC%3Ablue%3BL%3Ahttp%3A%2F%2Fipodlinux.org%2Fstylesheets%2Fimages%2Fwiki.png%3BALC%3Ablue%3BLW%3A128%3BT%3Ablack%3BAWFID%3A70a74ab66f4d59ae%3B&domains=ipodlinux.org&sitesearch=ipodlinux.org)