Tip on adding ttf in RH8

Place to discuss Fedora and/or Red Hat
Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Tip on adding ttf in RH8

Post by Ice9 » Mon Feb 17, 2003 3:18 pm

Void Main, one of the first things I did when I discovered about your RH tips was installing the MS ttfonts, and from that moment on I have been able to use them in Openoffice and possibly some other porgrams as well.
However Mozilla seemed to never use them, I found that a little odd but it didn't bother me too much.
But a few days ago when I started using stylesheets for my site I decided to experiment a little with fonts to see which one would fit it best.

Every MS font I wanted to use resulted in Mozilla's default (sans-serif I thik), so I went back to check your tip, did /usr/sbin/chkfontpath, checked /etc/X11/fs/config, the TTF were listed!
If I remember correctly Calum had a similar problem when adding them ......

I read up a little on the subject an came accross a post on a forum which was essentiually the same as your tip except for the final line :
"As root edit /etc/X11/XF86config and add

Code: Select all

Fontpath "/usr/X11R6/lib/fonts/TTF/"
to the fontpath section (which should be the first section of the file)."

I did that, restarted X and tested it, Mozilla recognized the fonts.

Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Post by Tux » Mon Feb 17, 2003 5:38 pm

Strange, my RedHat 8.0 install had that line already. I assume Void's did also hence him not including it in his tip. Odd.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Feb 18, 2003 5:01 am

That's strange indeed, but since my XF86config did not have the line and Calum had a similar problem it might be useful to add this to the actual tip, just in case some others have the same issue.

It's like pc's and OSes have a life of their own, sometimes they do stuff and sometimes they don't, there's always a perfectly logical explanation for it but sometimes it's really hard for humans to figure out. :wink:

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Feb 18, 2003 5:10 am

Actually, if you have your system installed properly that line should not be used in your XF86Config file. You should be using "xfs" (X Font Server) and only have a line in your /etc/X11/XF86Config that looks like this:

Code: Select all

        FontPath     "unix/:7100"
Of course if you don't use "xfs" then you'll need a list of every font directory. Now your "TTF" directory that you added to your /etc/X11/XF86Config file should be in the xfs config file "/etc/X11/fs/config". If it's not add it. If this is not in my tip I need to add it for both scenerios. Here's what is in my /etc/X11/fs/config file:

Code: Select all

#
# Default font server configuration file for Red Hat Linux
#

# allow a max of 10 clients to connect to this font server
client-limit = 10

# when a font server reaches its limit, start up a new one
clone-self = on

# alternate font servers for clients to use
#alternate-servers = foo:7101,bar:7102

# where to look for fonts
#
catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
        /usr/X11R6/lib/X11/fonts/75dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/100dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/misc,
        /usr/X11R6/lib/X11/fonts/Type1,
        /usr/X11R6/lib/X11/fonts/Speedo,
        /usr/X11R6/lib/X11/fonts/cyrillic,
        /usr/X11R6/lib/X11/fonts/TTF,
        /usr/share/fonts/default/Type1,
        /usr/lib/openoffice/share/fonts/truetype,
        /usr/share/AbiSuite/fonts
# in 12 points, decipoints
default-point-size = 120

# 100 x 100 and 75 x 75
default-resolutions = 75,75,100,100

# use lazy loading on 16 bit (usually Asian) fonts
deferglyphs = 16

# how to log errors
use-syslog = on

# don't listen to TCP ports by default for security reasons
no-listen = tcp

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Tue Feb 18, 2003 5:23 am

interesting! i keep meaning to figure out a version of those instructions that works on mandrake since one of the lines in the red hat version doesn't work in mandrake, mandrake provides a GUI program to do this job but it is totally rubbish.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Feb 18, 2003 5:23 am

That's exactly how it was, but it didn't work until I added the line to my XF86config :?

Edit: well actually it worked with Openoffice, so that has to be an indication, but Mozilla didn't put up anything else than the default font.

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Tue Feb 18, 2003 5:31 am

i added the fonts using mandrake crappy GUI and still can't get my fonts in openoffice (it used to work, back when i added the fonts before installing openoffice) and this is my motivation for figuring out the real working way to do it one of these days.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Feb 18, 2003 5:34 am

Do you have this line

Code: Select all

/usr/lib/openoffice/share/fonts/truetype, 
in your /etc/X11/fs/config file?

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Tue Feb 18, 2003 6:18 am

Are you asking me? If so I just posted my /etc/X11/fs/config file a couple of posts back and as you can see I do have that and I do not have the TTF font line in my XF86Config file and it works in both Mozilla and OpenOffice. Obviously I must have done something else but I can't remember what. Did you restart your font server and X? Also, I do have freetype installed and have these lines in my XF86Config Modules section:

Code: Select all

        Load  "freetype"
        Load  "type1"
Tell you what, here are some of my config files and output of my "xlsfonts" command etc:

http://voidmain.is-a-geek.net/files/ttf/

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Tue Feb 18, 2003 7:28 am

I was asking Calum actually :)
Sorry, should have used quotes.

But to answer your question, yes I restarted X, in fact I've shut down my machine quite often since then since I don't really like to leave it running when I'm gone for a couple of days.
Call me paranoiac but the world is full of script kiddies who have nothing better to do than vandalize a box, most of the time ad random, and I know I'm not proficient enough to be 100% sure I've secured my box like I should.
Right now I'm running the default "High" iptables config in which I added port 6346 to accept tcp traffic for Limewire to be able to run.

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Tue Feb 18, 2003 9:10 am

i don't know if i have that, i'm not at home right now, but i will be checking out everything mentioned in this thread to see if it connects the dots for me.

Tux
guru
guru
Posts: 689
Joined: Wed Jan 08, 2003 10:40 am

Post by Tux » Tue Feb 18, 2003 9:50 am

As I remembered it, my XF86Config had several Fontpath entries. Now that I look at it it only has the font server listed. Now that is strange.
Maybe lat time I looked at it was with my other RH8.0 install. I'm not sure why the XF86Config would differ between two identical installs on the same hardware though...

Oh well, I shan't lose any sleep over it.

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Feb 20, 2003 7:14 am

i just looked in my /etc/XF86Config-4 file (this is back in red hat 8 now) after doing the font adding thing, and saw this:
FontPath "/usr/X11R6/lib/X11/fonts/local/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
so i added this
FontPath "/usr/X11R6/lib/fonts/TTF/"
at the top and restarted xfs, but no joy yet, i still can't see the new fonts in openoffice :(
it worked perfectly the first time i tried it, i have since reinstalled red hat a couple of times and done these steps to the letter and it has not worked.
i haven't restarted XWindows yet though.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5712
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Thu Feb 20, 2003 8:17 am

1) Red Hat 8 doesn't use the "XF86Config-4" file anymore (and I assume you meant it was in the /etc/X11 dir and not /etc), it uses "XF86Config". You don't have a file called /etc/X11/XF86Config? If so you can add font paths all day long to /etc/X11/XF86Config-4 and it won't change anything.

2) I can't figure out why you would have font paths listed in your XF86Config when it should have installed "xfs" by default and used the font server instead of the font paths (unix/:7100). If you are using directories in your font paths instead of "unix/:7100" in your XF86Config file then "xfs" isn't even needed and restarting it will do you no good. "unix/:7100" means get the fonts from the font server that is running on the UNIX port 7100. The configuration file for the font server is /etc/X11/fs/config.

Now you've got me really confused! Why is yours different than the 20 Red Hat 8.0 installs I've done?

User avatar
Calum
guru
guru
Posts: 1348
Joined: Fri Jan 10, 2003 11:32 am
Location: Bonny Scotland
Contact:

Post by Calum » Thu Feb 20, 2003 1:04 pm

aha! yes, i just found out that it uses XF86Config too, but i'll tell you why it's different and this is something i should have thought of before.

my video card is not configured properly for X by the red hat or the mandrake installer. the first thing i do when i have installed red hat is run xf86config, thus generating a non-redhat XF86Config file. i suspect this is the source of my problems.

Post Reply