Fonts on X - solved

karlp at ourldsfamily.com karlp at ourldsfamily.com
Fri Sep 1 22:54:34 UTC 2006


On Fri, September 1, 2006 9:08 am, karlp at ourldsfamily.com wrote:
> Some time ago, there was a note about putting fonts into X for use with both
> the display and OpenOffice.org, etc.
>
> I kept the docs and had used them on a couple FC4 systems and a RH8.0 system
> with success.
>
> I've upgraded 2 of the systems to FC5 and the same processes don't work.
>
> Here's what I do:
>
> unzip/untar fonts to /usr/share/X11/fonts/NEWFONTDIR
> cd NEWFONTDIR
> mkfontdir -a `pwd`
> mkfontscale
> chkfontpath -a `pwd`
> service xfs restart
>
> So, what am I missing? Even a dreaded MS-like reboot did nothing. I've checked
> permissions and whatever else I could think of with a fuzzy brain.
>
> I did find a small set of windows fonts in an RPM online somewhere during the
> late hours last night. It's rpm was created by the author of the web page and
> is: msttcorefonts-2.0-1.noarch.rpm

Okay, the overwhelming response was, well, underwhelming, so with a fresh
brain this afternoon, I dug in a bit more. The msttcorefonts are now
installed, but I copied the fonts from my WIN2000 server and have installed
those, as well as about 1200 other fonts on a CD my wife wants me to be able
to use to create docs for her...

Here's what I did:

locate msttcorefonts revealed that I could
# cd /usr/share/fonts
# ls <=- the fonts I had available were there. Annoying that the path change
in FC5 hosed all the fonts in
# cd /usr/share/X11/fonts

I did
# mv /usr/share/fonts/* /usr/share/X11/fonts
# rmdir /usr/share/fonts
# ln -s /usr/share/X11/fonts /usr/share/fonts

Then, I wrote a script named updfonts.sh:

#!/bin/sh
echo "update file is /etc/X11/fs/config"
#DR=/usr/share/X11/fonts ;# linked to next line dir
DR=/usr/share/fonts
cd $DR
echo "Directory listing of $DR"
ls -t | grep -v util | grep -v encodings
echo -n "Enter Directory Where Your New Fonts Are (x=cancel) : "
read FD
if [ "$FD" = '' -o "$FD" = 'x' ] ; then
  cd $DR
  echo 'Nothing Done'
  exit 1
fi
cd $FD
mkfontdir -a `pwd`
mkfontscale
chkfontpath -r `pwd`
chkfontpath -a `pwd`
service xfs restart
cd $DR
exit 0

After running it against every directory it showed, yes, one at a time because
I'm a control freak, my fonts showed up in OpenOffice.org, Firefox, etc. I'm a
happy, yet blissfully annoying, person again...

-- 
karl
     _/  _/      _/      _/_/_/       ____________   __o
    _/ _/       _/      _/    _/     ____________  _-\<._
   _/_/        _/      _/_/_/                     (_)/ (_)
  _/ _/       _/      _/           ......................
 _/   _/ arl _/_/_/  _/ earson    KarlP at ourldsfamily.com
---
Senior Consulting Sys/DB Analyst
http://consulting.ourldsfamily.com
---
 My Thoughts on Terrorism In America right after 9/11/2001:
 http://www.ourldsfamily.com/wtc.shtml
---
 The world is a dangerous place to live... not because of
 the people who are evil, but because of the people who
 don't do anything about it.
 - Albert Einstein
---




More information about the Redhat-install-list mailing list