Differences between revisions 63 and 65 (spanning 2 versions)
Revision 63 as of 2014-04-07 02:20:08
Size: 8823
Editor: PaulWise
Comment: moved templates to sub-pages
Revision 65 as of 2014-07-31 13:40:14
Size: 9015
Editor: ?treaki
Comment:
Deletions are marked like this. Additions are marked like this.
Line 26: Line 26:
To view list of monospaced clint-side fonts (available from Xft, so it is possible to apply font hinting and antialiasing): To view list of monospaced client-side fonts (available from Xft, so it is possible to apply font hinting and antialiasing):
Line 52: Line 52:

If you want to use the new fonts like Calibri which came with msoffice 2007 you can download and install them for free (like free beer ;( ) from the ms powerpointviewer: [[ppviewerFonts]]

Adding fonts

Fonts can be added to Debian by installing the appropriate package; fonts are specified in the “Fonts” section.

Note:

  • 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 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.

Configuration

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 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 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 find the following useful to change default font rendering:

  $ dpkg-reconfigure fontconfig-config
  $ dpkg-reconfigure fontconfig

Lists

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.

email lists: CJKUnifonts-devel CJKUnifonts-HakkaIM CJKUnifonts-MinnanIM freefont-devel pkg-fonts-bugs pkg-fonts-commits pkg-fonts-devel

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 the new fonts like Calibri which came with msoffice 2007 you can download and install them for free (like free beer ;( ) from the ms powerpointviewer: ppviewerFonts

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

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

Debian Fonts Task Force

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

Bugs

Usertags

The pkg-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)

  • 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

sfd (fontforge's ascii file format for vector fonts) UFO (Unified Font Object)

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:

sfd2*.ff

Font Formats

ttf, otf, bdf, pfb, fnt, woff

Font Tools

texlive-font-utils, fttools, ttf2tex, freetype1-tools, ttf2pt1, otf2bdf, fonttools

Subpixel-hinting and Font-smoothing

The default fonts in Debian derived distributions like Ubuntu and Linux Mint have better looking fonts when compared to default Debian squeeze since the ubuntu-based distros have heavily patched cairo or freetype2 whereas Vanilla Debian doesn't do patching as much as they do. A lot of things about the cairo package has changed recently in wheezy and unstable which have brought almost the same font setup to Debian (But not Squeeze or old) but you have to set it up to your liking. You can create a .fonts.conf file to any user account home folder to set this up. Patching and rebuilding of Cairo packages are not needed any more. An example of .fonts.conf which you can add to your user account home folder without altering anything else:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>

Infinality for Debian

Infinality font settings and Infinality-freetype are not available for Debian in official repositories and will only be available once Infinality is pushed upstream. There are third party git repos you can use to get the packages working for you. Currently a working third party git repo created by chenxiaolong is available for all Debian architectures. Infinality font config Debian build instructions with prebuilt binaries for amd64 are available for easy installation in a post in the Debian forums created by a user.

Further Resources

Outdated

Old, retained for historical interest and reference: