Quote:
p.s. it might just have been easier to make a directory called "ghostscript" in /usr/share/fonts and put the ghostscript fonts in there, since i see that path is already being cached.
|
I created a directory called ghostscript in /usr/share/fonts. Then, I copied all font files from /usr/share/ghostscript/fonts to /usr/share/fonts/ghostscript. After this, I did fc-cache -fv. Now I got the output:
fc-cache: "/usr/share/fonts": caching, 0 fonts, 3 dirs
fc-cache: "/usr/share/fonts/default": caching, 0 fonts, 1 dirs
fc-cache: "/usr/share/fonts/default/Type1": caching, 0 fonts, 0 dirs
fc-cache: "/usr/share/fonts/ghostscript": caching, 52 fonts, 0 dirs
fc-cache: "/usr/share/fonts/latex-xft-fonts": caching, 7 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/TTF": caching, 55 fonts, 0 dirs
fc-cache: "/usr/X11R6/lib/X11/fonts/Type1": caching, 60 fonts, 0 dirs
fc-cache: "/root/.fonts": skipping, no such directory
fc-cache: succeeded
As we can notice, the ghostscript fonts are being cached. But there is a problem.
My problem is to make xfig locate ghostscript fonts. In the README file given with xfig it is given as follows:
It is highly recommended that you use Type1 fonts for xfig.
For RedHat systems you can use following command (as root):
chkfontpath --add /usr/share/fonts/default/Type1
For other X systems you can install the following ghostscript files
into your X11 Type1 fonts directory (usu. /usr/lib/X11/fonts/Type1) for
the best scalable on-screen fonts. You need to update the "fonts.dir"
and "fonts.scale" files to reflect these fonts.
Basically, if you copy the following lines into those two files and
update the count in the first line to include them, then do an
"xset fp rehash" the X Window System will know about them.
Of course, you will have to also copy the ghostscript font files
themselves (i.e. b018012l.pfb etc.) into the X11 fonts/Type1 directory.
You can get these fonts from
ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/fonts
n021003l.pfb -adobe-times-medium-r-normal--0-0-0-0-p-0-iso8859-1
n021004l.pfb -adobe-times-bold-r-normal--0-0-0-0-p-0-iso8859-1
n021023l.pfb -adobe-times-medium-i-normal--0-0-0-0-p-0-iso8859-1
n021024l.pfb -adobe-times-bold-i-normal--0-0-0-0-p-0-iso8859-1
a010013l.pfb -adobe-avantgarde-book-r-normal--0-0-0-0-p-0-iso8859-1
a010015l.pfb -adobe-avantgarde-demi-r-normal--0-0-0-0-p-0-iso8859-1
a010033l.pfb -adobe-avantgarde-book-o-normal--0-0-0-0-p-0-iso8859-1
a010035l.pfb -adobe-avantgarde-demi-o-normal--0-0-0-0-p-0-iso8859-1
b018012l.pfb -adobe-bookman-light-r-normal--0-0-0-0-p-0-iso8859-1
b018015l.pfb -adobe-bookman-demi-r-normal--0-0-0-0-p-0-iso8859-1
b018032l.pfb -adobe-bookman-light-i-normal--0-0-0-0-p-0-iso8859-1
b018035l.pfb -adobe-bookman-demi-i-normal--0-0-0-0-p-0-iso8859-1
n019003l.pfb -adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1
n019004l.pfb -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1
n019023l.pfb -adobe-helvetica-medium-o-normal--0-0-0-0-p-0-iso8859-1
n019024l.pfb -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-1
n019043l.pfb -adobe-helvetica-medium-r-narrow--0-0-0-0-p-0-iso8859-1
n019044l.pfb -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-1
n019063l.pfb -adobe-helvetica-medium-o-narrow--0-0-0-0-p-0-iso8859-1
n019064l.pfb -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-1
c059013l.pfb -adobe-new century schoolbook-medium-r-normal--0-0-0-0-p-0-iso8859-1
c059033l.pfb -adobe-new century schoolbook-medium-i-normal--0-0-0-0-p-0-iso8859-1
c059016l.pfb -adobe-new century schoolbook-bold-r-normal--0-0-0-0-p-0-iso8859-1
c059036l.pfb -adobe-new century schoolbook-bold-i-normal--0-0-0-0-p-0-iso8859-1
p052003l.pfb -adobe-palatino-medium-r-normal--0-0-0-0-p-0-iso8859-1
p052004l.pfb -adobe-palatino-bold-r-normal--0-0-0-0-p-0-iso8859-1
p052023l.pfb -adobe-palatino-medium-i-normal--0-0-0-0-p-0-iso8859-1
p052024l.pfb -adobe-palatino-bold-i-normal--0-0-0-0-p-0-iso8859-1
s050000l.pfb -URW-Standard Symbols L-medium-r-normal--0-0-0-0-p-0-urw-fontspecific
d050000l.pfb -URW-Zapf Dingbats-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific
z003034l.pfb -adobe-itc zapf chancery-medium-i-normal--0-0-0-0-p-0-iso8859-1
So, it is clear that xfig looks for the required fonts in /usr/lib/X11/fonts/Type1. But these fonts are already present in /usr/share/ghostscript/fonts. So, I created sym links to the font files in /usr/lib/X11/fonts/Type1 to point at corresponding font files in /usr/share/ghostscript/fonts. After this, I updated fonts.scale and fonts.dir files in /usr/lib/X11/fonts/Type1 as mentioned above. Now, to make xfig locate the fonts I did
xset fp rehash
Now, xfig is able to locate all the fonts. But suppose I close xfig and start it again, it is not locating the fonts unless I do xset fp rehash before starting xfig. So, every time I have to do xset fp rehash before starting xfig to make xfig locate the fonts. Is it possible to avoid this?
What is the difference between fc-cache -fv and xset fp rehash?
Please excuse me for this lengthy mail.
Anand