Stretch current (2017) font overview
A lot of font configuration things have been fixed so a lot of information on the web no longer applies. This overview explains the various sources of fonts, how the system uses it and when and what uses fixed scale fonts.
Scaling One's System For Large and Small Displays
- Example the xfont-100dpi package is needed for ???
- Does xfstt replace this need?
Fonts can be added to Debian by installing the appropriate package; fonts are specified in the “Fonts” section.
For most uses, you’ll want TrueType (TTF) and OpenType (OTF) fonts – these packages start with fonts-, ttf- or otf-.
Some non-free font downloader packages are in contrib, which you will need to add to your sources if not present.
Any TTF, OTF, or TTC (TrueType Collection) files can be manually installed on an ad hoc basis.
GNOME way: opening a Nautilus window to fonts:// and dragging and dropping.
Command line: copy a font file into the directory /usr/local/share/fonts (for all users) or ~/.fonts (for a specific user).
- Remember to verify the font's permissions on disk (644). The fc-cache command, below, is not going to warn you about wrong permissions; incorrect permissions can render installed fonts inaccessible.
The above mentioned paths can be customized in the fontconfig configuration file at /etc/fonts/fonts.conf – you can also include subdirectories or links, which is useful if you have a directory of fonts on a separate hard drive (or partition or other location).
You can also verify that the fonts are present by looking for them in an application (such as a word processor), or by using the command fc-list. A python based graphical utility, font-manager, is also available to preview all installed and available fonts.
fontconfig is the underlying configuration tool; you may find the following programs useful:
fc-list – lists fonts
fc-cache -fv – rebuilds cached list of fonts
To view a list of monospaced client-side fonts (available from Xft, so it is possible to apply font hinting and antialiasing):
$ fc-list :spacing=mono
To view a list of server-side (available directly from X server, so font hinting and antialiasing are not available) monospaced fonts:
$ xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-m*' $ xlsfonts -fn '*-*-*-*-*-*-*-*-*-*-*-c*'
You may also find the following useful to change the default font rendering:
$ dpkg-reconfigure fontconfig-config $ dpkg-reconfigure fontconfig
See all the fonts included in Debian at http://pkg-fonts.alioth.debian.org/review/ (updated weekly), http://www.miriamruiz.es/debfonts/ or http://fonts.debian.net/. For usage of Debian fonts on Windows or Mac OS X, see http://fonts.debian.net/. Various libre fonts are missing from Debian and need to be packaged.
Commonly Used Fonts
The fonts-liberation (ttf-liberation in squeeze) package supplies fonts with the same metrics as Times, Arial and Courier. These fonts are named Liberation and are present in most cases. If you require the non-free original Microsoft fonts the ttf-mscorefonts-installer package (in contrib) can be used to obtain them.
If you want to use non-free fonts like Calibri which originate from Microsoft Office, you can download and install them (gratis) from the Microsoft Powerpoint Viewer.
Debian Fonts Task Force
The pkg-fonts team will use these tags for usertags (user: email@example.com)
non-free: for packages that contain non-free fonts taken from the web (severity serious)
license-violation: for packages that contain fonts that are GPL/LGPL but do not distribute source (severity serious)
?contrib: for packages that contain free fonts that cannot be built with free tools (severity serious)
duplicate: for packages that contain fonts that duplicate fonts from other packages (severity normal?minor?wishlist?)
- split: for packages that contain fonts we would like to see split into other packages (severity wishlist)
fontconfig: for packages that should switch to dynamically looking up font paths using fontconfig (severity wishlist)
- render: for packages that should switch to a font renderer that automatically uses the right fonts (severity wishlist)
Source Font Formats
UFO (Unified Font Object)
Glyphs (proprietary format of Glyphs)
Generating Fonts from Source
The upstream build system should always be used for generating fonts. If upstream does not have a build system, then it is a good idea to contribute one to them based on the following Free Software tools.
The fontforge is an editor for outline and bitmap fonts that generates all kinds of fonts. It is also scriptable and has an addon tool xgridfit for hinting. Fonts using these tools can be found using these commands:
apt-cache rdepends fontforge apt-cache rdepends xgridfit
ttf, otf, bdf, pfb, fnt, woff
- Portal/IDB (icon-font-32x32.png)
- ReproducibleBuilds/TimestampsInFontsGeneratedWithFontForge (ttf-dejavu_2.33-3.debbindiff.html)
- SubstitutingCalibriAndCambriaFonts (Caladea.vs.Cambria-bitmap.png)
- SubstitutingCalibriAndCambriaFonts (LO_Options_Fonts.png)
Old, retained for historical interest and reference: