Installing the UW ttyp0 fonts


REQUIREMENTS:

To install UW ttyp0, you need:

- the standard Unix utilities, such as sh, cat, ls, install, and rm
- GNU make (this is the default "make" program under Linux, but other
  operating systems may differ)
- perl
- if you want to generate pcf fonts: bdftopcf
- if you want to generate otb fonts: fonttosfnt
- if you want to generate psf console fonts for Linux: bdf2psf
- if you want to generate vt console fonts for FreeBSD: vtfontcvt
- if you want to generate "big" fonts (height 60 or 80): bdfresize


INSTALLATION:

Step 1: Choose stylistic variants.

  The UW ttyp0 fonts offer stylistic variants for many characters.
  You can, for instance, choose whether you want a regular, a dotted
  or a slashed zero, a raised or a centered tilde, Russian, Serbian,
  or Bulgarian Cyrillic characters, and so on. Check doc/Variants.html
  for sample images

  Edit the file "VARIANTS.dat" to select your preferred stylistic
  variants. (If you don't, you have to live with my preferred stylistic
  variants.)

Step 2: Choose font formats, sizes, and encodings.

  The UW ttyp0 fonts are available as bdf, pcf, and otb fonts for
  X11, and as console fonts for Linux, FreeBSD (vt and syscons),
  NetBSD, and OpenBSD. They come in eleven sizes (from 11px to 40px)
  and three styles (regular, bold, italic), and can be installed for
  a large number of character encodings ("code pages", "code sets").
  (Two more sizes (60px and 80px) can be generated by naive scaling
  of the 30px and 40px fonts during the installation process.
  These fonts are intended only for high resolution displays. At low
  resolutions, they are noticably blocky.)

  First edit the file "TARGETS.dat" to select the desired font formats.

  Afterwards edit the file "TARGETS_yourselectedfontformat.dat" for
  each font format that you have selected to choose sizes, styles,
  and encodings. Note that the available choices depend on the
  selected font formats. For instance, Linux console fonts are
  restricted to 256 or 512 characters, FreeBSD syscons fonts are
  restricted to 256 characters and height 14 or 16, whereas FreeBSD
  vt fonts have no restriction on the number of characters and use
  a fixed encoding (namely Unicode).

Step 3: Compile and install fonts

  The sequence of commands
 
    $ ./configure [options]
    $ make
    # make install

  compiles and installs UW ttyp0 for the selected font formats. If you
  want a private installation of the fonts rather than a global one,
  use either "./configure -p" (to install all fonts in $HOME/.fonts) or
  "./configure -lp" (to install all fonts in $HOME/.local/share/fonts).
  For a full list of options, type "./configure --help". 

  (Unless you install the fonts in your home directory, "make install"
  must be executed as root.)

  Note that the fonts may not be immediately usable after installation.
  For instance, for X11 fonts (pcf, otb) it may be necessary to rebuild
  font information cache files after installing UW ttyp0. The commands
  are "xset fp rehash" (old X11 font system) and "fc-cache -f" (new
  X11 font system). To change the Linux console font temporarily, use
  "setfont"; to change it permanently, edit /etc/default/console-setup
  (if your system uses console-setup) or /etc/vconsole.conf (otherwise).
  For FreeBSD, "vidcontrol" is supposed to change the console font,
  but changing the screen dimensions seems to be badly documented, at
  least for vt. Be warned that console fonts for NetBSD and OpenBSD are
  built into the OS kernel, therefore the kernel has to be re-built
  in order to add further fonts.

Step 4: Troubleshooting

  In an ideal world, everything should work now and this part of the
  installation guide should be empty. Unfortunately, the X11 font system
  is far away from being an ideal world. There are several sources
  of problems. First of all, there is not only one X11 font system,
  but there are two of them: an older, server-based and a newer,
  client-based one. Second, there are two bitmap font formats for X11:
  the traditional pcf format and the newer otb format, which is more
  space-efficient, but has some quirks. Depending on how the font is
  installed, it may be accessible only to applications that use one of
  the two font systems or one of the two formats; so for instance,
  it may work in an xterm, but not in a KDE konsole. Third, in some
  distributions, bitmap fonts are explicitly disabled in order to ensure
  that the old bitmap versions of fonts like Times or Helvetica don't
  show up in your web browser. You may have to override this in order
  to use UW ttyp0. Fourth, it seems that each OS distribution and each
  desktop system offers a standard way to configure such things, but of
  course each one has a different standard. There isn't much help I can
  offer at this point -- in most cases, it's a good idea to search for
  "bitmap fonts", "install", and the name of your OS distribution,
  desktop system, or application in your favorite search engine.

  Common problems:

  For the older, server-based X11 font system, the fonts either need to
  be installed in a directory of the current font path, or the font
  path has to be extended. The current value of your font path can be
  obtained using "xset q". To extend the font path, the command
  "xset +fp NEW_FONT_DIRECTORY" must be executed after each login (or,
  more precisely, after each restart of the X server).

  The main problem of the newer, client-based X11 font system is that
  bitmap fonts like UW ttyp0 are often explicitly disabled. If there is
  a file /etc/fonts/conf.d/70-no-bitmaps.conf on your system, then they
  probably are disabled. In this case, you can enable UW ttyp0 globally
  by copying the following lines into a file
  /etc/fonts/conf.d/50-enable-ttyp0.conf

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
      <selectfont>
	<!-- enable UW ttyp0 -->
	<acceptfont>
          <!-- PCF fonts -->
	  <pattern>
	    <patelt name="family"><string>Ttyp0</string></patelt>
	  </pattern>
	  <pattern>
	    <patelt name="family"><string>UW Ttyp0</string></patelt>
	  </pattern>
          <!-- OTB fonts -->
	  <pattern>
	    <patelt name="family"><string>Ttyp0 OTB</string></patelt>
	  </pattern>
	</acceptfont>
      </selectfont>
    </fontconfig>

  If you want to (or have to) enable UW ttyp0 just for yourself, check
  first whether there is already a file ".config/fontconfig/fonts.conf"
  (new standard) or ".fonts.conf" (older standard) in your home
  directory. If there is no such file, or if it is empty, copy the
  lines above into it. If the file is non-empty, take just the lines
  from <selectfont> to </selectfont> and insert them into the file
  before the trailing </fontconfig>.



OTHER INSTALLATION OPTIONS

make bdf
make pcf
make otb
make conslinux
make consfreebsdvt
make consfreebsdsc
make consnetbsd
make consopenbsd
  Produce fonts in the specified format. Note that the specified format
  must be selected in TARGETS.dat; otherwise no fonts will be produced.

make install-util
  Installs the "bdfmangle" utility and its manual page in $prefix/bin
  and $prefix/man. Alternative directories can be specified using the
  configure options "--bindir=..." and "--mandir=...". (Installation of
  "bdfmangle" is not necessary to install the UW ttyp0 fonts.)

make install-doc
  Installs the documentation files of UW ttyp0 (CHANGELOG, INSTALL,
  LICENSE, README, doc/*) in $prefix/share/doc/fonts-uw-ttyp0.
  An alternative directory can be specified using the configure option
  "--docdir=...". (Installation of the documentation files is not
  necessary to install the UW ttyp0 fonts.)

make clean
  Removes all files generated by "make". (Files generated by "make
  install" are not affected.)

make distclean
  Restores the original content of TARGETS*.dat and VARIANTS.dat and
  removes all files generated by "./configure" or "make". (Files
  generated by "make install" are not affected.)

The UW ttyp0 Makefile supports the $(DESTDIR) convention.

