old-www/LDP/LG/issue76/tag/3.html

778 lines
28 KiB
HTML
Raw Permalink Blame History

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.4F.m">
<TITLE>The Answer Gang 76: Can't get all my True Type fonts to get recognized</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="..//"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A> &nbsp;
<A HREF="10.html">10</A> &nbsp;
<A HREF="11.html">11</A> &nbsp;
<A HREF="12.html">12</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="../../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Gang</font>
<img src="../../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and...
(<a href="bios.html">meet the Gang</a>) ...
the Editors of Linux Gazette...
and You!
<br>Send questions (or interesting answers) to
The Answer Gang
for possible publication
(but read the <a href="ask-the-gang.html">guidelines</a> first)
</H4>
</center>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<p><hr><p>
<!-- begin 3 -->
<H3 align="left"><img src="../../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>Can't get all my True Type fonts to get recognized</H3>
<p><strong>From leo
</strong></p>
<p align="right"><strong>Answered By Heather Stern, Ben Okopnik, Jay R. Ashworth, Thorsten M<>rell, Jim Dennis, Matthias
<p></strong></p>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
Hey Gang -
First off... absolutely stellar job. Linux is a little bit more fun as a
result of all of you.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Awww, shux
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
Anyhow, I can't seem to get all my TrueType fonts to
get recognized by ttmkfdir.
</STRONG></P>
<P><STRONG>
I've followed the True Type HOWTO exactly, and have been told to look at the
resulting fonts.dir and fonts.scale, and alas, only half the TrueType fonts
in that directory show up.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Most curious; if they are legal TTF's, they should respond to the "file"
command as something like:
</blockQuote>
<blockquote><code><font color="#000033"><br>swiss911.ttf: MS-Windows true type font .ttf
</font></code></blockquote>
<blockquote><font color="#000066"><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] notes about scale files <a href="#ttf/scale"
>moved down for readability</a>
</font></blockquote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
I downloaded some TrueType fonts off the web
(<A HREF="http://www.fontalicious.com"
>http://www.fontalicious.com</A>)...
is it
possible that these fonts don't adhere to some kind of standard that's out
there, and that's why ttmkfdir isn't working for them? If not, any ideas as
to what I can do to get this working?
</STRONG></P>
<HR width="10%" align="left"><P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Thanks for the quick response Heather...
So here's where I am now:
</STRONG></P>
<P><STRONG><BLOCKQuote>
After I went and got the file utility from rpmfind.net, I ran it and got this:
<br><code>
[silver] ~/fonts/&gt;file sushi.ttf
<Br>sushi.ttf: raw G3 data, byte-padded</code>
</BLOCKQuote></STRONG></P>
<P><STRONG>
The thing is, though, when I run file on say arial.ttf, I get this:
<br><code>
[silver] ~/fonts/file arial.ttf
<br>arial.ttf: raw G3 data, byte-padded</code>
</STRONG></P>
<blockquote><font color="#000066"><IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] Whereupon Ben and I both chased down a rathole for a while thinking that
perhaps he actually had downloaded a PICTURE of the font, instead of the
font itself. Never mind that usually such pictures would have been GIFs,
not "G3" TIFFs or other fax documents... the Gang came to the rescue, though...
</font></blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Also, that 'display' shows the file doesn't prove it's a normal image type -
display speaks Freetype!
</blockQuote>
<blockQuote>
This isn't obvious because it doesn't <EM>insist</EM> on it; there's a call to make
if you want to ask if a library is around to use, after you load. The better
gtk and Gnome apps sometimes use it, so that they can use plain xlibs if the
glitzier things aren't around.
</blockQuote>
<blockQuote>
(on my box it says it can't find Freetype, right before it fails to display
the font, on fonts which otherwise work just fine. GIMP sees 'em all because
of xfstt. Maybe my own "X 4 won't honor truetype" problem is that it doesn't
find the lib, and my xfstt does, or is static. Hmm.)
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thorsten]
I think your guess could be wrong. My file command also says, that my *.ttf
are "raw G3 data, byte-padded" (I've also got this <TT>/etc/magic</TT> from 1995), but
I'm using them in all my apps and ttmkfdir has recognized them, too.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
OK, so to cut through all the bull... A couple of minutes ago, I downloaded
the font that Leo mentioned. Looks pretty standard to "file" (BTW,
"display" can't see it).
</blockQuote>
<blockQuote>
I unzipped it with the "-L" switch (I like my filenames in lower case,
thank you), and moved it into "<TT>/usr/share/fonts/truetype/</TT>". Then, I shut
down the "xfstt" TrueType server, ran "xfstt --gslist --sync", started
"xfstt" back up, and ran "xset fp+ unix/:7101" to let X know that it had a
TT server running.
</blockQuote>
<blockQuote>
&lt;shrug&gt; Nice font.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
Naw...
</blockQuote>
<blockQuote>
I'll bet 10 bucks he has an out of date <TT>/etc/magic</TT> file.
</blockQuote>
<blockQuote>
Hey, Ben. Mail me one of those font files, and let me file(1) it
here...
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Aww, just go fetch one of the enlightenment themes over at e.themes.org.
It's pan-distro and they <EM>all</EM> have at least one ttf in them.
</blockQuote>
<blockQuote>
I really like the "ganymede" font.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
... with a <TT>/usr/share/magic</TT> dated 1/21/1995 (!) says that they're...
</blockQuote>
<blockQuote>
G3 files.
</blockQuote>
<blockQuote>
I <EM>know</EM> these are fonts, based on where they are (a directory called
lib/fonts), and what they're called ("Lucida Typewriter" and the like).
</blockQuote>
<blockQuote>
So file(1) is wrong, among other things.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Whoops. My "<TT>/etc/magic</TT>", dated 12/10/2000, with "file" v3.37, gets it right.
Once I updated. Hey, this <A HREF="http://www.debian.org/">Debian</A> "testing" distro stuff isn't too bad
at all...
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<p><em><a name="ttf/scale"> ... Which merely left the font server files to sort out ...</a>
</em></p>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I don't think I mentioned it before, but I'm running Drake 8 and xfs.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Nope, you hadn't. For comparison (tho I think I said) I'm answering from
a <A HREF="http://www.suse.com/">SuSE</A> box serving fonts via xfstt... as I haven't been using Redhat itself
for a while.
</blockQuote>
<blockQuote>
XFS without patches doesn't normally speak truetype, but I suppose you're
using the X 4.x.x edition?
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
but arial.ttf shows up in fonts.dir as
</STRONG></P>
<pre><strong>arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-15
arial.ttf -monotype-Arial-medium-r-normal--0-0-0-0-p-0-iso8859-1
</strong></pre>
<P><STRONG>
while sushi.ttf doesn't appear...
any ideas from here?
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Yes, these may be explicitly listed in fonts.scale, which is read
for the data ... used for fonts which do not contain the correct font
header info.
</blockQuote>
<blockQuote>
The real thing is managed by a triplet of files, which if kept all in sync,
all is happy. Those three files are fonts.dir, fonts.scale, fonts.alias.
fonts.dir and fonts.scale look exactly the same... the first line is a count
of how many fonts, and the rest are X-style control lines, where the first
word is the filename (foo.ttf) and the rest is a set of dash-separated
parameters. The fonts.alias file looks the same except, there is no count
line, and the ".ttf" gets stripped off. You can also add aliases for other
popular spellings of things ("Comic Sans" and "MS Comic Sans" as seperate
lines for the same font mscomicsans which is really comc.ttf), but I'm
generally too lazy.
</blockQuote>
<blockQuote>
Here's an example for a Star Trek font. Note that Bitstream did most of
the fonts for the series, but I created a special "foundry" to keep my
trek stuff.
</blockQuote>
<blockQuote>
fonts.scale and fonts.dir contain:
</blockQuote>
<blockquote><code><font color="#000033"><br>crillee.ttf -startrek-crillee.bt-medium-r-normal--0-0-0-0-p-0-iso8859-1
</font></code></blockquote>
<blockQuote>
but fonts.alias contains:
</blockQuote>
<blockquote><code><font color="#000033"><br>crillee -startrek-crillee.bt-medium-r-normal--0-0-0-0-p-0-iso8859-1
</font></code></blockquote>
<blockQuote>
Notice that the tail item is exactly the same for both. ttfmkdir just reads
the fonts and creates these entries.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
But, having these files in good health doesn't seem to guarantee success.
On my own SuSE 7.2 system, I find that the builtin Truetype handler in
its X 4 implementation doesn't act right:
</STRONG></P>
<blockquote><code><font color="#000033"><br>Could not init font path element /usr/X11R6/lib/X11/fonts/truetype, removing from list!
</font></code></blockquote>
<P><STRONG>
... so I use xfstt instead, which has worked for me for a long time, and has
no complaint about being pointed to the same directory. Sigh.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Matthias]
You may need to add
</blockQuote>
<blockquote><code><font color="#000033"><br>dir "/usr/X11R6/lib/X11/fonts/truetype"
</font></code></blockquote>
<blockQuote>
to your <TT>/etc/X11/XftCache</TT> and run (as root) <TT>/usr/X11R6/bin/xftcache</TT> to=20
generate the X Freetype Cache.
</blockQuote>
<blockQuote>
and run (as root)
</blockQuote>
<blockquote><code><font color="#000033"><br>/usr/X11R6/bin/xftcache
</font></code></blockquote>
<blockQuote>
to generate the X Freetype Cache.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Hmm. No such file on SuSE 7.2. What distro are you speaking from?
</STRONG></P>
<P><STRONG>
'locate' on the fragment 'xft' finds an x based FTP client, and 'xftree'
which is a file manager for the "Cool" environment aka XFCE. IOW, no dice
and/or that tool didn't come with the Xfree 4.x.x base, and I dunno which
RPM it'd be in.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Hummm. I've got an "<TT>/etc/X11/XftConfig</TT>" on my Debian rig; it comes from,
lessee now -
</blockQuote>
<blockquote><pre>ben@Baldur:/etc/X11$ dpkg -S XftConfig
xlibs: /etc/X11/XftConfig
ben@Baldur:/etc/X11$ dpkg -s xlibs
Package: xlibs
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 4956
Maintainer: Branden Robinson &lt;branden@debian.org&gt;
Source: xfree86
Version: 4.1.0-9
&lt;more output elided&gt;
</pre></blockquote>
<blockQuote>
Looks like pretty standard X-4.1.0 to me; I don't even know that it's
distro-related - "xlibs" <EM>should</EM> be fairly standard, right? On the other
hand, "xftcache" is part of "xbase-clients"; if you don't have that
installed (and Debian gets pretty cross with you if you don't, IIRC) you
might not have it to be "locate"d.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
SuSE 7.2 seems to have come with X 4.0.2. Sigh.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Matthias]
Then freetype enabled applications should see the fonts.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Magicpoint sees 'em fine...
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Matthias]
If you're using <A HREF="http://www.kde.org/">KDE</A> you may want to try "kfontinst", which can install TTF
and Type1 fonts easily. It also generates the files fonts.dir and
fonts.scale (whileas fonts.alias isn't needed by X to work).
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
I use some Gnome and K apps, but avoid the full environments.
</STRONG></P>
<P><STRONG>
My dad-in-lawi uses K though. Does it make Ghostscript play nice too?
That's where he's been having font fun lately, the world of K and X don't
seem to agree with the printer.
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Chances are excellent that kfontinst exists on Mandrake, so maybe
Leo can check if it does The Right Thing for him.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Matthias]
It also generates the files fonts.dir and
fonts.scale (whileas fonts.alias isn't needed by X to work).
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Strictly speaking, I don't think the font service doesn't need fonts.scale
either ... it's used by mkfontdir (or its cousins) along with the real fonts,
to compose fonts.dir.
</blockQuote>
<blockQuote>
All my fonts.* files are in fine shape; xfstt uses fonts.dir the same way
that standard xfs does, it just being the same server with a patch for
freetype support.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
Anyhow, Heather mentioned that:
</STRONG></P>
<Blockquote><em>
Yes, these may be explicitly listed in fonts.scale, which is read
for the data ... used for fonts which do not contain the correct font
header info.
</em></BLOCKQuote>
<P><STRONG>
If I were to do this, what would an entry look like?
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Here's my "<TT>/usr/X11R6/lib/X11/fonts/Speedo/fonts.scale</TT>":
</blockQuote>
<p align="center">See attached <tt><a href="../misc/tag/speedo.fonts.scale.txt">speedo.fonts.scale.txt</a></tt></p>
<blockQuote>
The top number in these is a count of the following font lines; I've
glanced at a couple of these, and that's what it adds up to. &lt;shrug&gt; I
guess that whoever wrote the software didn't feel like counting them. It
looks like a mapping of all the actual font names (the front part of the
string) into the type of font spec that X expects.
</blockQuote>
<p><em> ... and somewhere along the full discussion, Ben cranked out this ...
</em></p>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
</blockQuote>
<blockquote><pre>Baldur:~# perl -walne'/\.ttf\b/&amp;&amp;$x{$F[1]}++;END{print int keys %x}' Contents-i386
</pre></blockquote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
Okay, I'm not too proud to ask...
</STRONG></P>
<P><STRONG>
What the hell does that do?
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Heh. It's a glorified frequency counter (I throw away the actual count of
"items", so it just does a "uniq"):
</blockQuote>
<blockquote><code><font color="#000033"><br>-w enable warnings
<br>-a autosplit on whitespace, load result into the "@F" array
<br>-l line-end processing (in this case, print "\n"s after each line)
<br>-n run code in a non-printing loop
<br>-e execute the following code as script
</font></code></blockquote>
<blockquote><pre>/\.ttf\b/&amp;&amp;
</pre></blockquote>
<blockQuote>
If a line matches '.ttf' which is immediately followed by a word
boundary, then...
</blockQuote>
<blockquote><pre>$x{$F[1]}++
</pre></blockquote>
<blockQuote>
...using the second member of the "@F" array ($F[1]) as a key in the %x
hash, increment the value assigned to that key. This will build a hash with
every unique name as a key, and the values reflecting how many times that
key appeared.
</blockQuote>
<blockquote><pre>END{print int keys %x}
</pre></blockquote>
<blockQuote>
The END block, just like in "awk", runs only once, after the main loop has
finished. So, once "%h" is loaded up, we extract the list of keys from it.
"print keys %x" would have printed the list itself; "print int keys %x"
enforces scalar context on the list, and just prints the number of items in
it. Typical example of Perl context sensitivity.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Jay]
IOW: magic.
<IMG SRC="../../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
Ok here's the thing now: I added the dir entry (as suggested earlier by
someone else) in <TT>/etc/X11/XftCache</TT> and now there's a XftCache file
appearing in my fonts folder. Some of the fonts that don't appear in
fonts.dir appear in my new XftCache. Example entry:
</STRONG></P>
<pre><strong>"sushi.ttf" 0 "Sushi
High:style=Regular:slant=0:weight=100:encoding=iso10646-1,iso8859-1,apple-roman,iso10646-1,iso8859-1,glyphs-fontspecific:core=False:index=0:outline=True:scalable=True"
</strong></pre>
<P><STRONG>
Reissuing 'ttmkfdir -o fonts.scale' yields the same results (ie: sushi.ttf
doesn't appear in fonts.scale)...
</STRONG></P>
<P><STRONG>
So now I'm really lost... the light at the end of the proverbial tunnel keeps
getting darker and darker...
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thorsten]
No, no. That's wrong. In the world of Tux and his friends there aren't so much
tunnels and all are leading to something useful.
</blockQuote>
<blockQuote>
What does your ttmkfdir say, if you type "ttmkfdir --version", perhaps it
is out of date or too good for your fonts?
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
ttmkfdir --version yields no version information. Just says it's an invalid
option... the copyright information is from 1998. Should I go get the newest
ttmkfdir out there?
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Note that just having the right fonts.* files in my truetype directory aren't
enough to make it happy, either. If it helps, the home page for xfstt is...
uh... if you believe <A HREF="http://www.freshmeat.net/">Freshmeat</A>, it doesn't have one. But you can download iti
from ibiblio. The same place also mentions xfsft, which uses Freetype
directly, and is much better known. Of course I went to <EM>its</EM> homepage and
learn that he no longer maintains it seperately now that it is happily merged
into Xfree86 proper. So that answers <EM>my</EM> question anyway.
</blockQuote>
<blockQuote>
And it means that your own answer might be the same as mine, either one of:
</blockQuote>
<blockQuote><ul>
<li> use xfstt or another "external" font server to translate your TTF fonts
to a standard X protocol font
<li>
find and/or properly install Freetype libraries on your system, making sure
that ld.so.conf agrees with you on this subject. Don't forget to use
ldconfig to make it update the libraries locations. Also don't forget it
searches through the locations in the order listed, so if you've a bogus
library in there (an old rev maybe?) you really do need to take it out.
</ul></blockquote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [JimD]
No, worse! It uses data inside the library files to determine what
names they will honor. Definitely rip out bogus libraries.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
If anybody knows a way to ask a program which libraries it is potential-linking
as well as dynamic-linking to, I'll be <EM>glad</EM> to split that datum off into a
2 cent tip.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
Ok I ended up getting xfstt (grabbed it from rpmfind.net) and using that as
my external ttf server. Now (thankfully) everything seems to be working. I
followed Ben's directions as to setting it up, and since I got the rpm it
already put the script inside <TT>/etc/rc.d/init.d/</TT> for me.
</STRONG></P>
<P><STRONG>
Sorry for any pain this thread has caused... but thanks so much for the
help... I'd bake you all a cake, but that'll end up doing a lot more harm
than good...
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
No pain, at least none here. &lt;chuckle&gt; Since we're scattered all over the
place, you'd just have to eat it yourself. Just think of all those
calories! You're right; better skip it.
<IMG SRC="../../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Yeah, we probably all like dif't flavors too. But I'll eat a local slice
in your name if you like.
</blockQuote>
<P><STRONG>
<IMG SRC="../../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Leo]
thanks again -
leo
</STRONG></P>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Glad we could help, Leo.
</blockQuote>
<blockQuote>
<IMG SRC="../../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Yeah, enjoy your newfound font-dom.
</blockQuote>
<!-- end 3 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 2002
<BR>Published in issue 76 of <I>Linux Gazette</I> March 2002</H5>
<H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<!--startcut ======================================================= -->
<P> <hr>
<!-- begin tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::-->
<p align="center">
<table width="100%" border="0"><tr>
<td align="right" valign="center"
><IMG ALT="" SRC="../../gx/navbar/left.jpg"
WIDTH="14" HEIGHT="45" BORDER="0" ALIGN="middle" border="0"
><A HREF="..//"
><IMG SRC="../../gx/navbar/toc.jpg" align="middle"
ALT="[ Table Of Contents ]" border="0"></A
><A HREF="../lg_answer.html"
><IMG SRC="../../gx/dennis/answertoc.jpg" align="middle"
ALT="[ Answer Guy Current Index ]" border="0"></A></td>
<td align="center" valign="center"><A HREF="../lg_answer.html#greeting"><img align="middle"
src="../../gx/dennis/smily.gif" alt="greetings" border="0"></A> &nbsp;
<A HREF="../tag/bios.html">Meet&nbsp;the&nbsp;Gang</A> &nbsp;
<A HREF="1.html">1</A> &nbsp;
<A HREF="2.html">2</A> &nbsp;
<A HREF="3.html">3</A> &nbsp;
<A HREF="4.html">4</A> &nbsp;
<A HREF="5.html">5</A> &nbsp;
<A HREF="6.html">6</A> &nbsp;
<A HREF="7.html">7</A> &nbsp;
<A HREF="8.html">8</A> &nbsp;
<A HREF="9.html">9</A> &nbsp;
<A HREF="10.html">10</A> &nbsp;
<A HREF="11.html">11</A> &nbsp;
<A HREF="12.html">12</A>
</td>
<td align="left" valign="center"><A HREF="../../tag/kb.html"
><IMG SRC="../../gx/dennis/answerpast.jpg" align="middle"
ALT="[ Index of Past Answers ]" border="0"></A
><IMG ALT="" SRC="../../gx/navbar/right.jpg" align="middle"
WIDTH="14" HEIGHT="45" BORDER="0"></td></tr></table>
</p>
<!-- end tagnav ::::::::::::::::::::::::::::::::::::::::::::::::::::-->
<!--endcut ========================================================= -->
<P> <hr>
<!--startcut ======================================================= -->
<CENTER>
<!-- *** BEGIN navbar *** -->
<!-- *** END navbar *** -->
</CENTER>
</p>
<!--endcut ========================================================= -->
<!--startcut ======================================================= -->
</BODY></HTML>
<!--endcut ========================================================= -->