TTFFS(4) TTFFS(4)
NAME
ttffs - serve ttf fonts as Inferno (sub)fonts
SYNOPSIS
ttffs [ -dM ] [ -p fontpath ]
DESCRIPTION
Ttffs serves TrueType (ttf) font files as Inferno (sub)fonts
in arbitrary sizes, over 9P2000. Directory /fonts/ttf is
read at startup (or fontpath set with -p), and all ttf files
added to ttffs' index. New ttf files are automatically
indexed when the index file (described below) is opened.
Each ttf file has an associated ranges file listing the
glyphs available in the ttf file. If a ttf file does not
yet have a ranges file, it is created by ttffs automati-
cally. Ttffs mounts itself on /mnt/ft by default. With -M,
9P2000 is served on file descriptor 0 instead. Option -d
enables debug printing.
Files
The following files are served:
index
A read-only file returning the available fonts, one
line for each font name. A line consists of two quoted
strings, separated by a space. The first is a
cleaned-up version of the name (as found in the ttf
file) of the font. The second field is a font specifi-
cation as understood by fontsrv(4). The font name in
the specification is the original name found in the ttf
file. Multiple ttf files may result in a single line,
e.g. in the case of a single font face available in
multiple styles (regular, italic, bold).
style.size.font
When a file of this form is walked to, the ttf file
associated with that font specification is opened,
parsed and cached for subsequent use. Fontname is a
cleaned-up version of the font name contained in the
ttf file. Style must be one of r, i, b or ib. Size (in
pixels) must be a number greater than 1.
style.size.
Subfonts that are referenced by the .font-files. Index
is a number indicating the glyph range of the subfont.
EXAMPLES
# ensure /fonts/ttf/DejaVuSansMono.ttf and /mnt/ft exist
ttffs
wm/sh -f /mnt/ft/dejavu-sans-mono.r.10.font
Page 1 Plan 9 (printed 4/15/26)
TTFFS(4) TTFFS(4)
SOURCE
/appl/cmd/ttffs.b
FILES
/mnt/ft/index
/mnt/ft/*.font
/fonts/ttf/*.ttf
/fonts/ttf/ranges.*
SEE ALSO
draw-font(2), fontsrv(4), fonts(6).
BUGS
No kerning or subpixel rendering is supported. Only 8-bit
greyscale anti-aliased fonts are served.
The name ttffs
is not appropriate, more formats than just ttf could be
served: freetype supports more than just ttf.
Generating ranges.* files is slow.
Page 2 Plan 9 (printed 4/15/26)