Differences between revisions 42 and 133 (spanning 91 versions)
Revision 42 as of 2011-11-19 05:45:05
Size: 12410
Editor: PaulWise
Comment: spacing
Revision 133 as of 2021-12-16 14:06:50
Size: 13196
Editor: AlexMyczko
Comment: fix typos
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#language en

~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[fr/Fonts|Français]] - [[ko/Fonts|한국어]] -~
Line 4: Line 8:
Fonts can be added to Debian by installing the appropriate package; in Squeeze, fonts are specified in the “Fonts” section.
 * DebianPkg:lenny/x11/
 * DebianPkg:squeeze/fonts/
 * DebianPkg:sid/fonts/
Note:
 * For most uses, you’ll want TrueType (TTF) fonts – these packages start with `ttf-`
 * Some non-free fonts are in `contrib`, which you will need to add to your `sources` if no present.

To add fonts on an ad hoc basis, you may install them in GNOME by opening a Nautilus window to `fonts://` and dragging and dropping.

In more detail, place a font file in the directory `/usr/local/share/fonts` (for all users) or `~/.fonts` (for a specific user); both TTF and TTC (TrueType Collection) files should work. These paths are specified in the WikiPedia: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) [[http://code.google.com/p/font-manager/|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.

=== Packages ===
Fonts can be added system-wide to Debian by installing the appropriate package; fonts are specified in the [[DebianPkg:stable/fonts/|“Fonts” section]].
As default system-wide fonts will be installed into `/usr/share/fonts` by the package-manager.

Notes:
 * For most uses, you’ll want TrueType (TTF) and !OpenType (OTF) fonts – these packages start with `fonts-`.
 * Some fonts might have a -variable build, which are known as (VF), variable font.
 * Some non-free font downloader packages are in `contrib`, which you will need to add to your `sources` if not present.

=== Manually ===
Install a font manually by downloading the appropriate `.ttf` or `otf` files and placing them into `/usr/local/share/fonts` (system-wide), `~/.local/share/fonts` (user-specific) or `~/.fonts` (user-specific). These files should have the permission `644` (`-rw-r--r--`), otherwise they may not be usable.

Run `fc-cache` to update the font cache (add `-v` for verbose output).
The above mentioned paths can be customized in the WikiPedia: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).

If you are installing bit map fonts you might need to enable this with dpkg-reconfigure:
{{{
  # dpkg-reconfigure fontconfig-config
}}}

Then enable bit maps font in the third screen.

GNOME users can simply open a Nautilus window to `fonts://` and drag&drop the font files in there.

You can verify 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, DebianPkg:font-manager, is also available to preview all installed and available fonts.
Line 19: Line 36:
Line 20: Line 38:
 `fc-list` – lists fonts
 `fc-cache -fv` – rebuilds cached list of fonts

You may find the following useful to change default font rendering:
 `dpkg-reconfigure fontconfig-config`

 `dpkg-reconfigure fontconfig`

== Lists ==

See all the TrueType (TTF) fonts included in Debian at http://pkg-fonts.alioth.debian.org/review/ (updated weekly), http://www.miriamruiz.es/debfonts/ or http://fonts.debian.net/.

See all the TrueType (TTF) and OpenType (OTF) fonts included in Debian for usage on Windows or Mac OS X at http://fonts.debian.net/.

email lists: [[http://lists.alioth.debian.org/mailman/listinfo/cjkunifonts-devel|CJKUnifonts-devel]] [[http://lists.alioth.debian.org/mailman/listinfo/cjkunifonts-hakkaim|CJKUnifonts-HakkaIM]] [[http://lists.alioth.debian.org/mailman/listinfo/cjkunifonts-minnanim|CJKUnifonts-MinnanIM]] [[http://lists.alioth.debian.org/mailman/listinfo/freefont-devel|Freefont-devel]] [[http://lists.alioth.debian.org/mailman/listinfo/pkg-fonts-bugs|Pkg-fonts-bugs]] [[http://lists.alioth.debian.org/mailman/listinfo/pkg-fonts-commits|Pkg-fonts-commits]] [[http://lists.alioth.debian.org/mailman/listinfo/pkg-fonts-devel|Pkg-fonts-devel]]

== Commonly Used Fonts ==

The [[http://packages.debian.org/search?keywords=ttf-liberation&searchon=name|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 [[http://packages.debian.org/search?keywords=ttf-mscorefonts-installer&searchon=name|ttf-mscorefonts-installer]] package (in contrib) can be used to obtain them.

== Debian Fonts Task Force ==

http://pkg-fonts.alioth.debian.org/

 * `fc-list` – lists fonts
 * `fc-match -s helvetica` – show an ordered list of fonts matching a certain name or pattern
 * `fc-cache -fv` – rebuilds cached list of fonts (in `~/.config/fontconfig`, older caches may also be in `~/.fontconfig`)

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
}}}

== Font lists ==

The page http://www.miriamruiz.es/debfonts/ displays the fonts contained in some packages, but the list of packages and fonts isn't updated any more.

The [[http://pkg-fonts.alioth.debian.org/review/|Debian Fonts Review]] [[Services/DebianFontReview|service]] [[https://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2016-September/018319.html|needs]] to be [[https://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2016-September/018325.html|revived]].

The [[https://web.archive.org/web/20160303215740/http://fonts.debian.net/|Free Font Compilation]] is is also no longer updated. A new version of it is here:
[[http://bootes.ethz.ch/fonts/|Free Font Compilation]] with each font (from Google Web Fonts) as [[http://bootes.ethz.ch/fonts/deb|.deb]] and [[http://bootes.ethz.ch/fonts/rpm/|.rpm]]

Various libre fonts are [[Fonts/Missing|missing]] from Debian and need to be packaged.

=== Commonly Used Fonts ===

The DebianPkg:fonts-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 DebianPkg:ttf-mscorefonts-installer package (in contrib) can be used to obtain them.

East Asian fonts: DebianPkg:fonts-arphic-uming DebianPkg:fonts-wqy-zenhei DebianPkg:fonts-sazanami-mincho DebianPkg:fonts-sazanami-gothic DebianPkg:fonts-unfonts-core

(from [[WikiPedia:Help:Multilingual_support_(East_Asian)#Debian-based_GNU.2FLinux|Wikipedia: Help:Multilingual support (East Asian)]])

If you want to use non-free fonts like Calibri which originate from Microsoft Office, you can download and [[ppviewerFonts|install them]] (gratis) from the Microsoft Powerpoint Viewer.

== Screenshots of Fonts in Debian ==

With: http://screenshots.debian.net/packages?search=fonts-&show=with

Without: http://screenshots.debian.net/packages?search=fonts-&show=without

== Troubleshooting ==

If fonts do not display properly, you may want to make sure the right font gets loaded, for example with:

{{{
fc-match -s Helvetica
}}}

If it doesn't, you may want to regenerate the caches with:

{{{
dpkg-reconfigure fontconfig fontconfig-config
}}}

You can also run this as a user with `fc-cache -fv`.

Otherwise, you can also look at the font in a viewer like DebianPkg:font-manager.

Individual font rendering can be tested directly with the `ftview` program available in the DebianPackage:freetype2-demos package. For example, here is how to show sample glyphs from the [[https://en.wikipedia.org/wiki/Liberation_fonts|Liberation]] Mono font using the 3.5 and [[https://www.freetype.org/freetype2/docs/subpixel-hinting.html|4.0 rendering engines]]:

{{{
FREETYPE_PROPERTIES="truetype:interpreter-version=35" ftview 16 /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf &
FREETYPE_PROPERTIES="truetype:interpreter-version=40" ftview 16 /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf &
}}}

This was quite useful to diagnose changes in the engine after the Debian buster upgrade, described in DebianBug:866685.
<<Anchor(bugs)>>
Line 46: Line 117:
<<Anchor(non-free)>>
<<Anchor(license-violation)>>
<<Anchor(rfn-violation)>>
<<Anchor(duplicate)>>
<<Anchor(fontconfig)>>
<<Anchor(render)>>
Line 48: Line 126:
The pkg-fonts team will use these tags for usertags ([[http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=pkg-fonts-devel@lists.alioth.debian.org|user: pkg-fonts-devel@lists.alioth.debian.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?)
The fonts team will use these tags for usertags ([[http://bugs.debian.org/cgi-bin/pkgreport.cgi?users=pkg-fonts-devel@lists.alioth.debian.org|user: pkg-fonts-devel@lists.alioth.debian.org]])

 * [[/Bugs/non-free|non-free]]: for packages that contain non-free fonts taken from the web (severity serious)
 * [[/Bugs/license-violation|license-violation]]: for packages that contain fonts that are GPL/LGPL but do not distribute source (severity serious)
 * [[/Bugs/rfn-violation|rfn-violation]]: for packages that contain OFL fonts with a Reserved Font Name that have not been renamed or have lost the upstream RFN notice (severity serious)
 * [[/Bugs/contrib|contrib]]: for packages that contain free fonts that cannot be built with free tools (severity serious)
 * [[/Bugs/duplicate|duplicate]]
: for packages that contain fonts that duplicate fonts from other packages (severity normal?minor?wishlist?)
Line 54: Line 134:

=== Templates ===

==== non-free ====

{{{
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: <package>: contains non-free font

Package:
Version:
Severity: serious
User: pkg-fonts-devel@lists.alioth.debian.org
Usertags: non-free
X-Debbugs-CC: pkg-fonts-devel@lists.alioth.debian.org

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
}}}


==== license-violation ====

{{{
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: <package>: violates font license

Package:
Version:
Severity: serious
User: pkg-fonts-devel@lists.alioth.debian.org
Usertags: license-violation
X-Debbugs-CC: pkg-fonts-devel@lists.alioth.debian.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
}}}

==== duplicate ====

{{{
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: <package>: contains duplicate font

Package:
Version:
Severity: wishlist
User: pkg-fonts-devel@lists.alioth.debian.org
Usertags: duplicate
X-Debbugs-CC: pkg-fonts-devel@lists.alioth.debian.org

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
}}}

==== defoma-removal ====

{{{
Package: $PACKAGE
Severity: wishlist
User: pabs@debian.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.

pkg-fonts-devel@lists.alioth.debian.org
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 [[http://packages.debian.org/fontforge|fontforge]] is an editor for outline and bitmap fonts that generates all kinds of fonts. It is also scriptable and has an addon tool [[http://packages.debian.org/xgridfit|xgridfit]] for hinting. The following fonts are built from sfd (found using apt-cache rdepends fontforge):

- [[http://packages.debian.org/ttf-junicode|ttf-junicode]]

- [[http://packages.debian.org/ttf-beteckna|beteckna]]

- [[http://packages.debian.org/ttf-essays1743|essays1743]]

- [[http://packages.debian.org/ttf-atarismall|ttf-atarismall]]

- [[http://packages.debian.org/ttf-breip|ttf-breip]]

I created some script to create bold, italic, and condensed typefaces out of sfd fonts:

[[http://gnu.ethz.ch/linuks.mine.nu/beteckna/beteckna-0.2/|sfd2*.ff]]

== Font Formats ==

ttf, otf, bdf, pfb, fnt
 * [[/Bugs/fontconfig|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)

<<Anchor(formats)>>
== Font design and formats ==

<<Anchor(source-formats)>>
=== Source Font Formats ===

 * SFD ([[https://fontforge.github.io/sfdformat.html|Spline Font Database]], FontForge's ASCII file format for vector fonts)
 * UFO ([[http://unifiedfontobject.org/|Unified Font Object]])
 * Glyphs (proprietary format of [[https://glyphsapp.com/|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 DebianPkg:fontforge is an editor for outline and bitmap fonts that generates all kinds of fonts. It is also scriptable and has an addon tool DebianPkg:xgridfit for hinting. Fonts using these tools can be found using these commands:

{{{
apt-cache rdepends fontforge
apt-cache rdepends xgridfit
}}}

Maybe this is more useful to find packages that build from source with fontforge or fontmake (will not work with multi-line Build-Depends):

{{{
apt-cache search ^fonts- | awk '{print $1}' | while read a; do echo -ne "$a "; apt-cache showsrc $a | grep Build-Depends; done
}}}

There is also DebianPkg:birdfont and DebianPkg:ttfautohint and DebianPkg:fontmake

<<Anchor(output-formats)>>
=== Output Font Formats ===

ttf, otf, bdf, pfb, fnt, woff

<<Anchor(tools)>>
Line 264: Line 174:
texlive-font-utils, fttools, ttf2tex, freetype1-tools, ttf2pt1, otf2bdf

== fontconfig ==

Fonts and Debian: [[http://pkg-fonts.alioth.debian.org/review/|existing]] and [[http://wiki.debian.org/Fonts/Missing|missing]]

Font related pages:
||''Tool'''||''Debian package'''||'''Comments'''||
|| [[ DebianPkg:|bdf2sfd ]] || DebianPkg:bdf2sfd || Convert BDF bitmap font to vector format (fontfourge source) ||
|| [[http://www.tug.org/texlive/|texlive-font-utils]] || DebianPkg:texlive-font-utils || Programs for font conversion, testing, and other manipulation. ||
|| fttools || || || ||
|| || DebianPkg:lcdf-typetools || tools for OpenType, multiple-master, and Type 1 fonts ||
|| [[https://www.ctan.org/pkg/ttf2tex|ttf2tex]] || || ||
|| freetype1-tools || || || ||
|| [[http://ttf2pt1.sourceforge.net/|ttf2pt1]] || || Font converter from TrueType to Adobe Type1. ||
|| [[https://www.math.nmsu.edu/~mleisher/Software/otf2bdf/|otf2bdf]] || DebianPkg:otf2bdf || Command line utility that generates BDF bitmap fonts from OpenType fonts. ||
|| [[https://github.com/behdad/fonttools|fonttools]] || DebianPackage:fonttools || A Python library to open and manipulate OTF and TTF files. ||
|| [[https://fontmanager.github.io/|GTK+ Font Manager]] || DebianPkg:font-manager || Python program to show and compare fonts ||
|| [[https://github.com/GNOME/gnome-font-viewer|GNOME Font Viewer]] || DebianPkg:gnome-font-viewer || Simple interface to show a preview of all fonts installed ||

There are several font tools which are not included in Debian, but are used to produce fonts included in Debian:

|| {i} || Available in Debian although not yet in stable. ||
|| {*} || Someone is working on inclusion into Debian. ||
|| {o} || Someone requested inclusion into Debian. ||
|| {X} || Someone needs to [[http://www.debian.org/devel/wnpp/#l1|file an RFP or ITP bugreport]] and update this page with resulting bug number. ||
|| /!\ || Was available in Debian but is not part of stable or unstable. ||

||<style="width: 40%; text-align: left;">'''Tool'''||'''Comments'''||
|| {o} [[https://github.com/ayoy/fontedit]] || DebianBug:962120 ||
|| {i} [[https://github.com/typesupply/defcon|defcon]] || DebianBug:806513 ||
|| {i} [[https://github.com/typemytype/booleanOperations|booleanOperations]] || DebianBug:806516 ||
|| {i} [[https://github.com/googlei18n/cu2qu|cu2qu]] || DebianBug:868004 ||
|| {i} [[https://github.com/googlei18n/fontmake|fontmake]] || DebianBug:865283 ||
|| {i} [[https://github.com/googlei18n/glyphsLib|glyphsLib]] || DebianBug:868005 ||
|| {i} [[https://github.com/LettError/MutatorMath|MutatorMath]] || DebianBug:806503 ||
|| {i} [[https://github.com/googlei18n/ufo2ft|ufo2ft]] || DebianBug:868006 ||
|| {i} [[https://github.com/alexmyczko/fnt|fnt]] || DebianBug:984461 ||
|| {i} [[https://github.com/jonpalmisc/vfit|vfit]] || DebianBug:1001777 ||
|| {*} [[https://github.com/fcambus/bdf2sfd|bdf2sfd]] || DebianBug:951034 ||
|| {*} [[http://www.seasip.info/Unix/PSF/|psftools]] || DebianBug:874548 ||
|| {X} [[http://shell.aiei.ch/typography/|mkspecimen]] || Font specimen generator, inspired by Wikipedia version ||
|| {X} [[http://phd-sid.ethz.ch/appstream/|debian2appstream]] || AppStream metadata generator for fonts (pregenerated fonts- entries) (a dh_font deb helper script should be made) this is good if you want the fonts to appear in the gnome/kde app stores ||

== Further Resources ==

=== Reference manual ===
{{{#!wiki debian
[[https://www.debian.org/doc/manuals/debian-reference/ch07.en.html#_fonts_in_the_x_window|Fonts in the X Window]]}}}

=== Wiki pages ===
Line 274: Line 221:
== Further Resources ==
* [[tahoma]]

=== Other links ===

 * [[https://salsa.debian.org/fonts-team|Salsa Group 'Team Fonts']]
Line 277: Line 227:
 * [[http://wiki.archlinux.org/index.php/Font_Configuration|Font Configuration]], ArchLinux Wiki useful general information

=== Outdated ===
 * [[https://fedoraproject.org/wiki/Category:Fonts|Fedora]] fonts information
 * [[https
://wiki.archlinux.org/index.php/Fonts|Arch Linux]] fonts documentation

==== Outdated ====
Line 281: Line 233:
 * [[http://pkg-fonts.alioth.debian.org/|Debian Fonts Task Force]]

Translation(s): English - Français - 한국어

Adding fonts

Packages

Fonts can be added system-wide to Debian by installing the appropriate package; fonts are specified in the “Fonts” section. As default system-wide fonts will be installed into /usr/share/fonts by the package-manager.

Notes:

  • For most uses, you’ll want TrueType (TTF) and OpenType (OTF) fonts – these packages start with fonts-.

  • Some fonts might have a -variable build, which are known as (VF), variable font.
  • Some non-free font downloader packages are in contrib, which you will need to add to your sources if not present.

Manually

Install a font manually by downloading the appropriate .ttf or otf files and placing them into /usr/local/share/fonts (system-wide), ~/.local/share/fonts (user-specific) or ~/.fonts (user-specific). These files should have the permission 644 (-rw-r--r--), otherwise they may not be usable.

Run fc-cache to update the font cache (add -v for verbose output). 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).

If you are installing bit map fonts you might need to enable this with dpkg-reconfigure:

  # dpkg-reconfigure fontconfig-config

Then enable bit maps font in the third screen.

GNOME users can simply open a Nautilus window to fonts:// and drag&drop the font files in there.

You can verify 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.

Configuration

fontconfig is the underlying configuration tool; you may find the following programs useful:

  • fc-list – lists fonts

  • fc-match -s helvetica – show an ordered list of fonts matching a certain name or pattern

  • fc-cache -fv – rebuilds cached list of fonts (in ~/.config/fontconfig, older caches may also be in ~/.fontconfig)

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

Font lists

The page http://www.miriamruiz.es/debfonts/ displays the fonts contained in some packages, but the list of packages and fonts isn't updated any more.

The Debian Fonts Review service needs to be revived.

The Free Font Compilation is is also no longer updated. A new version of it is here: Free Font Compilation with each font (from Google Web Fonts) as .deb and .rpm

Various libre fonts are missing from Debian and need to be packaged.

Commonly Used Fonts

The fonts-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.

East Asian fonts: fonts-arphic-uming fonts-wqy-zenhei fonts-sazanami-mincho fonts-sazanami-gothic fonts-unfonts-core

(from Wikipedia: Help:Multilingual support (East Asian))

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.

Screenshots of Fonts in Debian

With: http://screenshots.debian.net/packages?search=fonts-&show=with

Without: http://screenshots.debian.net/packages?search=fonts-&show=without

Troubleshooting

If fonts do not display properly, you may want to make sure the right font gets loaded, for example with:

fc-match -s Helvetica

If it doesn't, you may want to regenerate the caches with:

dpkg-reconfigure fontconfig fontconfig-config

You can also run this as a user with fc-cache -fv.

Otherwise, you can also look at the font in a viewer like font-manager.

Individual font rendering can be tested directly with the ftview program available in the freetype2-demos package. For example, here is how to show sample glyphs from the Liberation Mono font using the 3.5 and 4.0 rendering engines:

FREETYPE_PROPERTIES="truetype:interpreter-version=35" ftview 16 /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf  &
FREETYPE_PROPERTIES="truetype:interpreter-version=40" ftview 16 /usr/share/fonts/truetype/liberation/LiberationMono-Regular.ttf  &

This was quite useful to diagnose changes in the engine after the Debian buster upgrade, described in 866685.

Bugs

Usertags

The fonts team will use these tags for usertags (user: pkg-fonts-devel@lists.alioth.debian.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)

  • rfn-violation: for packages that contain OFL fonts with a Reserved Font Name that have not been renamed or have lost the upstream RFN notice (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)

Font design and formats

Source Font Formats

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

Maybe this is more useful to find packages that build from source with fontforge or fontmake (will not work with multi-line Build-Depends):

apt-cache search ^fonts- | awk '{print $1}' | while read a; do echo -ne "$a "; apt-cache showsrc $a | grep Build-Depends; done

There is also birdfont and ttfautohint and fontmake

Output Font Formats

ttf, otf, bdf, pfb, fnt, woff

Font Tools

Tool

Debian package

Comments

bdf2sfd

bdf2sfd

Convert BDF bitmap font to vector format (fontfourge source)

texlive-font-utils

texlive-font-utils

Programs for font conversion, testing, and other manipulation.

fttools

lcdf-typetools

tools for ?OpenType, multiple-master, and Type 1 fonts

ttf2tex

freetype1-tools

ttf2pt1

Font converter from TrueType to Adobe Type1.

otf2bdf

otf2bdf

Command line utility that generates BDF bitmap fonts from ?OpenType fonts.

fonttools

fonttools

A Python library to open and manipulate OTF and TTF files.

GTK+ Font Manager

font-manager

Python program to show and compare fonts

GNOME Font Viewer

gnome-font-viewer

Simple interface to show a preview of all fonts installed

There are several font tools which are not included in Debian, but are used to produce fonts included in Debian:

{i}

Available in Debian although not yet in stable.

{*}

Someone is working on inclusion into Debian.

{o}

Someone requested inclusion into Debian.

{X}

Someone needs to file an RFP or ITP bugreport and update this page with resulting bug number.

/!\

Was available in Debian but is not part of stable or unstable.

Tool

Comments

{o} https://github.com/ayoy/fontedit

962120

{i} defcon

806513

{i} booleanOperations

806516

{i} cu2qu

868004

{i} fontmake

865283

{i} glyphsLib

868005

{i} MutatorMath

806503

{i} ufo2ft

868006

{i} fnt

984461

{i} vfit

1001777

{*} bdf2sfd

951034

{*} psftools

874548

{X} mkspecimen

Font specimen generator, inspired by Wikipedia version

{X} debian2appstream

AppStream metadata generator for fonts (pregenerated fonts- entries) (a dh_font deb helper script should be made) this is good if you want the fonts to appear in the gnome/kde app stores

Further Resources

Reference manual

Wiki pages

* tahoma

Outdated

Old, retained for historical interest and reference: