234 lines
11 KiB
HTML
234 lines
11 KiB
HTML
|
<!--startcut ==============================================-->
|
||
|
<!-- *** BEGIN HTML header *** -->
|
||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML><HEAD>
|
||
|
<title>Fonts for the Common Desktop Environment (or: How To Alias Your Fonts) LG #88</title>
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
||
|
ALINK="#FF0000">
|
||
|
<!-- *** END HTML header *** -->
|
||
|
|
||
|
<!-- *** BEGIN navbar *** -->
|
||
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="ecol.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue88/jenkins.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../lg_faq.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="lodato.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
|
||
|
<!-- *** END navbar *** -->
|
||
|
|
||
|
<!--endcut ============================================================-->
|
||
|
|
||
|
<TABLE BORDER><TR><TD WIDTH="200">
|
||
|
<A HREF="http://www.linuxgazette.com/">
|
||
|
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
|
||
|
WIDTH="200" HEIGHT="41" border="0"></A>
|
||
|
<BR CLEAR="all">
|
||
|
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
|
||
|
</TD><TD WIDTH="380">
|
||
|
|
||
|
|
||
|
<CENTER>
|
||
|
<BIG><BIG><STRONG><FONT COLOR="maroon">Fonts for the Common Desktop Environment (or: How To Alias Your Fonts)</FONT></STRONG></BIG></BIG>
|
||
|
<BR>
|
||
|
<STRONG>By <A HREF="../authors/jenkins.graham.html">Graham Jenkins</A></STRONG>
|
||
|
</CENTER>
|
||
|
|
||
|
</TD></TR>
|
||
|
</TABLE>
|
||
|
<P>
|
||
|
|
||
|
<!-- END header -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h2>Yet Another New Desktop Environment?</h2>
|
||
|
|
||
|
<p>Actually, it's not. The Common Desktop Environment (CDE) has been around
|
||
|
for as long as some of those who will be reading this article. It was
|
||
|
jointly developed by IBM, Sun, HP and Novell so as to provide a unified
|
||
|
"look and feel" to users of their systems. It was also adopted by other
|
||
|
companies (notably Digital Equipment).
|
||
|
You can find further details at
|
||
|
<a href="http://www-1.ibm.com/servers/aix/cde/cdewhat.html">
|
||
|
"IBM AIX: What is CDE?"</a>.</p>
|
||
|
|
||
|
<P>
|
||
|
[<A HREF="misc/jenkins/ScreenShot.jpg">Screenshot: a typical CDE screen</A>]
|
||
|
|
||
|
<p>The early versions of KDE appear to have been based on CDE, and the
|
||
|
more recent releases of XFce have a look-and-feel which is very similar
|
||
|
to that of CDE. A key difference here is that both KDE and XFce are
|
||
|
Open Source developments.</p>
|
||
|
|
||
|
<img src="misc/jenkins/FontSize1.jpg" width="480" height="306" border="0"
|
||
|
align="right" hspace="10" vspace="10" alt="DeskTop Terminal (dtterm)">
|
||
|
|
||
|
<p>One of the most-used CDE applications is probably its desktop terminal
|
||
|
'dtterm' which was based on 'xterm' with some extra menu-bar capabilities;
|
||
|
its look is not unlike that of 'gnome-terminal'. There are also image-viewer,
|
||
|
performance-monitoring, mail-reader and other useful tools.</p>
|
||
|
|
||
|
<h2>Why Should I Care?</h2>
|
||
|
|
||
|
<p>I work in an environment where I am required to access and manage a
|
||
|
number of Solaris and HP-UX servers. Most of my work is done at a
|
||
|
NetBSD-based Xterminal, managed by a remote Solaris machine so that I
|
||
|
have a CDE desktop. There are times it is managed instead by a remote
|
||
|
Linux machine so that I have a Gnome desktop. And there are times
|
||
|
(too many of them!) when I work from home, using a Linux machine with
|
||
|
a locally-managed Gnome desktop.</p>
|
||
|
<br clear="all">
|
||
|
|
||
|
<p>It matters little where I am working; as soon as I open up a CDE utility
|
||
|
such as 'dtterm', my Xserver starts looking for CDE-specific fonts. It seems
|
||
|
that a number of vendor-supplied backup and other utilities also make use
|
||
|
of these fonts.</p>
|
||
|
|
||
|
<img src="misc/jenkins/FontSize2.jpg" width="480" height="306" border="0"
|
||
|
align="right" hspace="10" vspace="10" alt="DeskTop Terminal without Font Support">
|
||
|
|
||
|
<p>In the case of 'dtterm' the end-result is that an attempt
|
||
|
to select a different-sized font produces a selection list containing eight
|
||
|
fonts, and seven of these can't be found. It is actually possible to get
|
||
|
around this by redefining on the Solaris or HP host the names of the fonts
|
||
|
which are used for the 'dtterm' application. This can be done at either a
|
||
|
system-wide or a user-specific level; either way, it's hardly an elegant
|
||
|
solution.<p>
|
||
|
|
||
|
<p>In the case of a splash-screen produced at CDE-login time, the result
|
||
|
can be quite dire: the user is unable to read the login prompts or error
|
||
|
messages! More recent versions of both Solaris and HP-UX get around this
|
||
|
by attempting to append an entry like 'tcp/hpmachine:7100' to the
|
||
|
font-path at login time. That's fine unless your site security policy
|
||
|
prohibits the activation of font service on your Solaris and HP servers.</p>
|
||
|
|
||
|
<h2>Why Not Use Specialised Font Server Machines?</h2>
|
||
|
|
||
|
<p>You can designate a couple of machines as font-servers for your site. These
|
||
|
can be small dedicated machines, or they can offer other services (such as
|
||
|
DHCP, NTP, etc.) as well. That's actually the way that it's done with 'thin'
|
||
|
Xterminals from companies like IBM, NCD and HP.</p>
|
||
|
|
||
|
<p>There are several issues. First up, you have to actually install
|
||
|
the CDE-fonts on the font-server machines; there may be some copyright
|
||
|
issues here if you are installing (for instance) HP CDE fonts on Linux
|
||
|
machines.</p>
|
||
|
|
||
|
<p>Something we noticed in practice is that the Xserver software
|
||
|
we are using doesn't seem smart enough to do a transparent fail-over in the
|
||
|
event of a single server disconnection. So what happens is that
|
||
|
a user suddenly finds himself presented with a blank screen.</p>
|
||
|
|
||
|
<p>If you are working from home with a modem connection to the LAN
|
||
|
on which your font-servers reside, it can take some time for required
|
||
|
fonts to arrive when you start a 'dtterm' application.<p>
|
||
|
|
||
|
<h2>Install on Every Xserver?</h2>
|
||
|
|
||
|
<p>This is certainly a possibility, and if you can live with the
|
||
|
copyright issues, it will solve most of the problems outlined above. But it
|
||
|
will require an extra 10Mb of filespace on each system.<p>
|
||
|
|
||
|
<h2>There is Another Way!</h2>
|
||
|
|
||
|
<p>The good news is that you don't have to lose sleep over the copyright
|
||
|
issues. And you don't have to install strange fonts all over your
|
||
|
font directories.</p>
|
||
|
|
||
|
<p>All you need do is identify some commonly-available fonts which
|
||
|
closely match the CDE-specific fonts, and create one 'fonts.alias' file.
|
||
|
Place it in an appropriate directory (e.g. '/usr/X11R6/lib/X11/fonts/local'),
|
||
|
and run 'mkfontdir' in that directory. Then ensure that the directory
|
||
|
name is included in your font-server configuration
|
||
|
file (e.g. '/usr/X11R6/lib/X11/fs/config'). If your version of Linux
|
||
|
(or NetBSD, or FreeBSD ..) doesn't include a term like 'unix/:7100'
|
||
|
in its 'XF86Config' (or similar) server configuration file, you should
|
||
|
place the name of your selected font directory in that configuration file.</p>
|
||
|
|
||
|
<h2>The Intimate Details</h2>
|
||
|
|
||
|
<p>Here's what the 'fonts.alias'
|
||
|
<a href="misc/jenkins/fonts.alias.txt"> file</a> looks like.
|
||
|
For clarity, I've shown just the first two and the last alias hereunder, and
|
||
|
I've broken each line at the whitespace between the alias-name and it's
|
||
|
corresponding real font. There wasn't a great deal of science went
|
||
|
into the development of this file, although I did use a couple of
|
||
|
simple scripts to assemble it. It was just a matter of finding, for each alias,
|
||
|
a font having similar characteristics and size.</p>
|
||
|
|
||
|
<pre>
|
||
|
! XFree86-cdefonts-1.0-2
|
||
|
! Font Aliases for Common Desktop Environment using XFree86 fonts.
|
||
|
! Graham Jenkins <grahjenk@au1.ibm.com> October 2001.
|
||
|
-dt-application-bold-i-normal-serif-11-80-100-100-m-60-iso8859-1
|
||
|
"-adobe-courier-bold-o-normal--11-80-100-100-m-60-iso8859-1"
|
||
|
-dt-application-bold-i-normal-serif-14-100-100-100-m-90-iso8859-1
|
||
|
"-adobe-courier-bold-o-normal--14-100-100-100-m-90-iso8859-1"
|
||
|
...
|
||
|
"-dt-interface user-medium-r-normal-xxl serif-21-210-72-72-m-140-hp-roman8"
|
||
|
"-b&h-lucidatypewriter-medium-r-normal-sans-24-240-75-75-m-140-iso8859-1"
|
||
|
</pre>
|
||
|
|
||
|
|
||
|
<h2>Read My Lips</h2>
|
||
|
|
||
|
<p>OK, so you've read this far, and you're still asking "Why Should I Care?".
|
||
|
My guess is that eighty percent of you have never used CDE and are unlikely
|
||
|
to use it in the future.</p>
|
||
|
|
||
|
<p>But what I can guarantee is that most of you are going to run an application
|
||
|
one day, and wonder why it's fonts don't display or scale properly. My hope is
|
||
|
that when that happens, you'll recall what you've read here - and apply it to
|
||
|
the creation of an appropriate 'fonts.alias' file as outlined above.</p>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<!-- *** BEGIN author bio *** -->
|
||
|
<P>
|
||
|
<P>
|
||
|
<!-- *** BEGIN bio *** -->
|
||
|
<P>
|
||
|
<img ALIGN="LEFT" ALT="[picture]" SRC="../gx/2003/authors/Graham_Jenkins.jpg"
|
||
|
WIDTH="223" HEIGHT="207">
|
||
|
<em>
|
||
|
Graham is a Unix Specialist at IBM Global Services, Australia. He lives
|
||
|
in Melbourne and has
|
||
|
built and managed many flavors of proprietary and open systems on several
|
||
|
hardware platforms.
|
||
|
</em>
|
||
|
<br CLEAR="all">
|
||
|
<!-- *** END bio *** -->
|
||
|
|
||
|
<!-- *** END author bio *** -->
|
||
|
|
||
|
|
||
|
<!-- *** BEGIN copyright *** -->
|
||
|
<hr>
|
||
|
<CENTER><SMALL><STRONG>
|
||
|
Copyright © 2003, Graham Jenkins.
|
||
|
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
|
||
|
Published in Issue 88 of <i>Linux Gazette</i>, March 2003
|
||
|
</STRONG></SMALL></CENTER>
|
||
|
<!-- *** END copyright *** -->
|
||
|
<HR>
|
||
|
|
||
|
<!--startcut ==========================================================-->
|
||
|
<CENTER>
|
||
|
<!-- *** BEGIN navbar *** -->
|
||
|
<IMG ALT="" SRC="../gx/navbar/left.jpg" WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="bottom"><A HREF="ecol.html"><IMG ALT="[ Prev ]" SRC="../gx/navbar/prev.jpg" WIDTH="16" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="index.html"><IMG ALT="[ Table of Contents ]" SRC="../gx/navbar/toc.jpg" WIDTH="220" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../index.html"><IMG ALT="[ Front Page ]" SRC="../gx/navbar/frontpage.jpg" WIDTH="137" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue88/jenkins.html"><IMG ALT="[ Talkback ]" SRC="../gx/navbar/talkback.jpg" WIDTH="121" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><A HREF="../lg_faq.html"><IMG ALT="[ FAQ ]" SRC="./../gx/navbar/faq.jpg"WIDTH="62" HEIGHT="45" BORDER="0" ALIGN="bottom"></A><A HREF="lodato.html"><IMG ALT="[ Next ]" SRC="../gx/navbar/next.jpg" WIDTH="15" HEIGHT="45" BORDER="0" ALIGN="bottom" ></A><IMG ALT="" SRC="../gx/navbar/right.jpg" WIDTH="15" HEIGHT="45" ALIGN="bottom">
|
||
|
<!-- *** END navbar *** -->
|
||
|
</CENTER>
|
||
|
</BODY></HTML>
|
||
|
<!--endcut ============================================================-->
|