Fonts can be added to Debian by installing the appropriate package; in Squeeze, fonts are specified in the “Fonts” section.
Some non-free fonts are in contrib, which you will need to add to your sources if no 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 in the directory /usr/local/share/fonts (for all users) or ~/.fonts (for a specific user).
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 may check that the fonts are present by checking for them in an application (such as a word processor) or by using the command fc-list – in future the (GNOME) font-manager may provide a good list. If fonts do not show up, try fc-cache -fv to force a rebuild of the font list.
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
You may find the following useful to change default font rendering:
Commonly Used Fonts
The ttf-liberation 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.
Debian Fonts Task Force
The pkg-fonts team will use these tags for usertags (user: firstname.lastname@example.org)
- 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)
- 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)
To: Debian Bug Tracking System <email@example.com> Subject: <package>: contains non-free font Package: Version: Severity: serious User: firstname.lastname@example.org Usertags: non-free X-Debbugs-CC: email@example.com Your package contains a non-free font: <filename in Debian here> <url to the pkg-fonts review page here> This looks to be from here: <upstream URLs here> From the zip file: /---------------------------------------------------------------- <upstream licence here> \---------------------------------------------------------------- This licence does not clearly allow all the DFSG-required freedoms: http://www.debian.org/social_contract#guidelines Please contact the font author and ask them to licence the font under a DFSG-compliant font licence such as the OFL: http://scripts.sil.org/OFL http://scripts.sil.org/OFL_web http://scripts.sil.org/OFL-FAQ_web If they are not willing to do so or cannot be contacted, please remove the font from the binary package and the source package and depend on another font package or move the package to non-free. Please contact your upstream and ask them to use fontconfig or similar to get fonts for use by the software instead of using a specific font. This message is brought to you by the Debian Fonts Task Force: http://wiki.debian.org/Fonts
To: Debian Bug Tracking System <firstname.lastname@example.org> Subject: <package>: violates font license Package: Version: Severity: serious User: email@example.com Usertags: license-violation X-Debbugs-CC: firstname.lastname@example.org Your package contains a GPL/LGPL font: <package>: <filename in Debian here> <url to the pkg-fonts review pages here> This looks to be from here: <upstream URLs here> Your source package contains the binary font: <srcpackage>: <font filename within source package> The font's source code appears to be here: <upstream source code URL> <filenames of the source code in upstreams archive> Your source package does not contain the font source code, therefore your distribution of the font constitutes a violation of the license. Please notify your upstream that they are violating the font license. Please remove the font from the binary package and the source package and depend on the font package instead. Please contact your upstream and ask them to use fontconfig or similar to get fonts for use by the software instead of using a specific font. This message is brought to you by the Debian Fonts Task Force: http://wiki.debian.org/Fonts
To: Debian Bug Tracking System <email@example.com> Subject: <package>: contains duplicate font Package: Version: Severity: wishlist User: firstname.lastname@example.org Usertags: duplicate X-Debbugs-CC: email@example.com Your package contains a duplicate font: <filename in Debian here> <url to the pkg-fonts review page here> This looks to be from here: <url to the packages.debian.org page for the font package> <url to the pkg-fonts review page here> Please remove the font from the binary package and depend on the package containing the font you are using. If your package cannot use fontconfig to search for fonts, please contact your upstream and ask them to use fontconfig or similar to get fonts for use by the software instead of using a specific font. If that isn't possible you should ask them to allow a build-time configuration option to hardcode a specific font file path. If that isn't possible then you will need to create a symlink from the font file path that your package uses to the font file path in the font package. This message is brought to you by the Debian Fonts Task Force: http://wiki.debian.org/Fonts
Package: $PACKAGE Severity: wishlist User: firstname.lastname@example.org Usertags: defoma-removal Your package ships a defoma hint file or depends on or uses defoma or x-ttcidfont-conf. defoma is in the process of being removed from Debian: http://wiki.debian.org/OldPkgRemovals#defoma If you have any questions about this transition, please contact the Debian Fonts Task Force on our mailing list. We are also interested in new people if you want to help us maintain, check and discuss fonts. email@example.com http://lists.alioth.debian.org/mailman/listinfo/pkg-fonts-devel http://pkg-fonts.alioth.debian.org/ http://wiki.debian.org/Fonts To help us complete the transition from defoma to fontconfig, please remove any use of defoma or x-ttcidfont-conf from your package. Here are some things that you might want to check in your package: If installing your package causes defoma to modify the defoma configuration file for fontconfig (/etc/fonts/conf.d/30-defoma.conf), then you need to migrate those changes to a file in the fontconfig directory /etc/fonts/conf.avail with a symlink in /etc/fonts/conf.d. In some cases the config produced by defoma was not appropriate in the first place and should be dropped. Remove any mentions of defoma, defoma-doc, psfontmgr or x-ttcidfont-conf from your debian/control file. If you are running dh_installdefoma in your debian/rules file, simply remove that call. If you were shipping a defoma hint file and processing the hints file using defoma in your maintainer scripts (postrm, postinst etc, dh_installdefoma usually handles them) then on upgrade from a version before the one that dropped you need to `defoma-font purge-all /etc/defoma/hints/$PACKAGE.hints`, but only if the defoma-font binary is available and executable. If you are shipping a defoma hint file, then you will need to remove it on upgrade. You can do so by adding this snippet to your postinst, postrm and preinst maintainer scripts. You should replace $PACKAGE with the name of the package and $VERSION with the version where you are making the defoma hint conffile obsolete and removable: if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then dpkg-maintscript-helper rm_conffile /etc/defoma/hints/$PACKAGE.hints $VERSION -- "$@" fi If you were shipping a defoma backend then on upgrade from a version before the one that dropped you need to run `defoma-app purge $PACKAGE`, but only if the defoma-app binary is available and executable. If defoma-app is not available then you could remove the relevant directory in /var/lib/defoma/.
Source Font Formats
sfd (fontforge's ascii file format for vector fonts)
Generating Fonts from Source
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. The following fonts are built from sfd (found using apt-cache rdepends fontforge):
I created some script to create bold, italic, and condensed typefaces out of sfd fonts:
ttf, otf, bdf, pfb, fnt
texlive-font-utils, fttools, ttf2tex, freetype1-tools, ttf2pt1, otf2bdf
Font related pages:
- InstallingDebianOn/Lenovo/Ideapad Yoga Slim 7 15IIL05 ( bullseye ) (firefox font configuration.png)
- 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)
Chinese fonts in Debian - a blog post
Old, retained for historical interest and reference: