Hi,
I am a software developer for BBC News Online
(http://news.bbc.co.uk).
Since our site relaunch last November we have had a few complaints from Unix
users because our headline fonts came out very jagged under netscape.
Having
looked into the problem somewhat, we have written an information file which
we
plan to send to anyone notifying us of such problems; the document
outlines the
reason for the problem and describes one solution (xfstt, as
it seemed to be simple to obtain and install). I have included the
document
underneath this message, and we'd be very grateful if anyone would be
willing to
read it and give us some feedback on whether the information is correct,
whether
there is a better solution etc. etc. (the free publicity is purely a
secondary
consideration :-).
I realise that this may not be the best forum to ask this (not least
because I believe Red Hat's font server can be patched to use True Type
fonts) but it seemed a lively, friendly list and I couldn't find anything
equivalent to the Linux-help list which seems to have disappeared. If
anyone
knows of another, more appropriate list please let me know at
[EMAIL PROTECTED] (I am not planning on extensive cross-posting, but I
hope that the possibility of sending this message to one other, more
appropriate, list should not be too riling; I am also posting it to
comp.os.linux.misc).
Anyway, below is the information we have compiled. Thanks in
advance
for any feedback. Yours,
Stephen Betts.
==
Stephen T. Betts
Software Developer
BBC News Online
0181-576-1121
[EMAIL PROTECTED]
======================================================================
Font Rendering In Unix
======================
Introduction
============
The BBC News Online site was relaunched in November 1999, with an
improved design and an extensive implementation of cascading
stylesheets, as recommended by the World Wide Web Consortium. This
was intended to produce pages which would look optimal in browsers
which supported stylesheets, such as Netscape 4, but would degrade
gracefully in older browsers.
However, even when using Netscape 4 under Unix it has been noticed
that the large fonts are sometimes displayed unsatisfactorily, with a
jagged appearance. This problem may be solved in a number of ways,
and the one which we have implemented and seen to work is the
installation of xfstt, a Truetype font server, and some Truetype fonts.
This document is intended to give Unix users wishing to view our pages
as they were intended to be seen the information necessary to find out
more about the issues and to modify their systems.
URLs are given below to pages containing information about Truetype
fonts and their use under Linux, and also about obtaining and
installing the xfstt package. Most of the Web pages are aimed at Linux
users, but should hopefully be useful for people using other flavours
of Unix.
Obtaining More Information
==========================
The following URLs should be useful for those who want to find out
more about the use of Truetype fonts under Linux; those who would
rather just find out how to obtain and install xfstt should jump to
the next section. Note that some of the details in these pages may be
slightly out of date, but the general information should be correct
and highly useful.
About Truetype fonts in general:
http://siva.usc.edu/~brion/linux/TrueType-HOWTO.html
On the use of Truetype fonts under XFree86:
http://www.xfree86.org/FAQ/
http://howto.tucows.com/LDP/HOWTO/XWindow-User-HOWTO.html (and, in
particular, chapters 2 and 7).
General information on making fonts under Linux more attractive:
http://www.linuxdoc.org/HOWTO/mini/FDU.html
There are numerous websites from which you may download free Truetype
fonts, and a simple web search should come up with more than you will
need. The standard Microsoft ones may be obtained from
http://www.microsoft.com/typography/fontpack/default.htm
but you will need to have the unzip command installed to use them.
Alternatively, if you are using a dual-boot system then you should
have a lot already installed under the Windows 95 directory
c:\windows\fonts\ or the Windows NT directory c:\winnt\fonts\.
A brief overview of the xfstt package and its capabilities is given at
http://www.redhat.com/mirrors/LDP/LDP/LG/issue28/ayers1.html.
The homepage for xfsft which gives another approach to using Truetype
fonts under Linux may be found at
http://www.dcs.ed.ac.uk/home/jec/programs/xfsft/
Obtaining and Installing the xfstt Package
==========================================
The xfstt package is widely available on the Web, and there are many
pages which give information on its installation and configuration.
Note that xfstt does not come with any fonts; in order for it to do
anything you need to have some Truetype fonts in the directory
"/usr/share/fonts/truetype/".
Which sort of xfstt package you should obtain depends somewhat upon
how you wish to use xfstt. If you have your X server set up to start
automatically when your computer boots, and would like xfstt to start
with it, the easiest way is to use rpm (the Redhat Package Management tool,
which itself is available from
ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/) with an appropriate RPM
file. As well as the standard xfstt package, this will also install a
script in your /etc/rc.d/init.d directory so that xfstt is run as a
daemon (of course, if you are sufficiently proficient, you can do this
yourself with the standard distribution). A suitable RPM file can be
found at
http://ftp.grupolinux.org/redhat-contrib/i386/xfstt-0.9.99-2.i386.rpm
We have used this RPM file successfully on a Pentium running Redhat
Linux 6.0, with one minor modification to change the default
resolution of the fonts; please see the "Additional Notes on xfstt"
section below.
Alternatively, if you would rather install and/or run xfstt manually
you can find a tarred, gzipped version (and various other font
utilities) in the following web directory:
http://metalab.unc.edu/pub/Linux/X11/fonts/
The FAQ and INSTALL information should tell you all you need to know
in order to compile, install and run the package.
Additional Notes on xfstt
=========================
As mentioned in the FAQ included in the tarred, gzipped distribution,
the X server sometimes gives xfstt an innapropriate default
resolution, which will result in the Truetype fonts being displayed
at the wrong size. The default dpi values normally seem to be 72 or
96, so if your Truetype fonts are displaying too large or too small
you can try changing this with the command line option "--res". In
order to implement this you will need to kill the xfstt server and
then restart it; when using netscape, we found that the change in
resolution did not take effect until netscape itself was restarted as
well. Details on how to restart the xfstt server when running it
manually or as a daemon are given below.
Changing the Resolution when Running xfstt Manually
---------------------------------------------------
If you are starting xfstt manually and the fonts seem to be too large,
try killing the server and then rerunning it with the command
"xfstt --res 72"; conversely, if you are finding that the
fonts are too small, kill the server and then try "xfstt --res 96".
Changing the Resolution when Running xfstt as a Daemon
------------------------------------------------------
To correct the font size when you are running xfstt as a daemon as set
up by the RPM file it is necessary to edit the "/etc/rc.d/init.d/xfstt"
script; change the line
"$XFSTT --port $PORT --user $USER --dir $TTFONTS --cache $CACHE --daemon"
to
"$XFSTT --port $PORT --user $USER --dir $TTFONTS --cache $CACHE
--daemon --res [DPI]" (on a single line)
where [DPI] is the appropriate number depending on whether the fonts
appear too large or too small, as described above for the manual start up.
(We run xfstt as a daemon (having installed it using rpm) and found
that the default resolution was too small, and so we use
"$XFSTT --port $PORT --user $USER --dir $TTFONTS --cache $CACHE
--daemon --res 72").
You will then need to kill the running daemon with the command
"/etc/rc.d/init.d/xfstt stop"
(I have found that you sometimes need to issue this command twice;
use "ps -A" to see whether there are still any xfstt processes
running) and then restarting it with the command
"/etc/rc.d/init.d/xfstt start".
Conclusions and Acknowledgements
================================
Of course, there are many other Truetype font utilities around, which
should work just as well as xfstt, however xfstt seemed to be one of
the most straightforward to obtain and install. It should also be
mentioned that it has the capability to enhance your system in many
other ways in addition to improving the look of our Website.
We would like to thank Herbert Duerr and Stephen Carpenter the creator
and maintainer of xfstt, respectively, and also the authors of all the
above Web pages.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.