Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Some questions about Red Hat Linux 9...

Status
Not open for further replies.

TheBigBasicQ

Programmer
Dec 20, 2001
107
IN
Firstly I am a newbie to Linux but a programmer in M$ langs. I am using KDE 2.0(I am not sure of the version, it came with RH9) I wanted to install some fonts I got from a friend. These fonts are in a .gz archive which I unzipped to a dir. How do I install these fonts? I looked at the documentation it mentioned that there is a font installer utility but I cannot find it anywhere.

Secondly, where can I find Windows fonts(True Type) for RH Linux 9?(I dont view some pages correctly in Mozilla/Konqueror Browser in KDE).

Thirdly, I dont know how but when I login as root some of my keys dont work(like the a, scroll lock key etc). I tried changing the keyboard layout but this does not solve the problem. But when I login as a normal user my keyboard works perfectly. What could be the problem?

Thanks.
 
For RedHat, download a utililtiy called ttmkfdir. It will help you out. Have a google around for it. You also need to copy the fonts to the true type fonts directory. Have a look at the font paths in your /etc/X11/xf86config-4 file.

You can copy all the fonts from a Windows machine from the C:\Windows\Fonts directory. Copy all the *.ttf files, as they are the ones you need. Also, if you get Arial Unicode MS (should be in the fonts directory and is a true-type font), then this will fix 99% of your font problems with the web.



 
Can u tell me how to use this utility? I found the xf86config file but i dont know which is the path(for the ttf font files) in the file or where to look for it. I have copied the ttf files in /root/temp directory.

What do i do next?
 
I haven't used RedHat for a while, but if you open your /etc/X11/XF86Config-4, it will usually list your font paths. If there is no path for a true type font directory, then you can add one, eg:

FontPath "/usr/X11R6/lib/X11/fonts/TrueType"

-OR-

FontPath "/usr/X11R6/lib/X11/fonts/TTF"

-OR-

A path where you would like to put them, e.g

FontPath "/usr/share/fonts/TTF"

Then, make a directory which corresponds to the one you have entered in the XF86Config-4 file. Copy all your fonts to the directory. Next cd into the directory and type:

ttmkfdir -o fonts.scale
ttmkfdif -o fonts.dir

Make sure you uncomment any lines in your XF86Config-4 which start the true type font server. Restart the font server or log out and log back in and your fonts should be working.

If I can recall, there are some release notes on the Redhat CD1 that may give you some more info.

If you are still hopelessly stuck, look around on google for setting up true type fonts. If you are still unsure after that, then post your XF86Config-4 file and we'll fix it from there.
 
I am hopelessly stuck :(. Here is that file u asked for:

# XFree86 4 configuration created by redhat-config-xfree86

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "DevInputMice" "AlwaysCore"
EndSection

Section "Files"

# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection

Section "InputDevice"

# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "Microsoft"
Option "Device" "/dev/ttyS0"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection

Section "InputDevice"

# If the normal CorePointer mouse is not a USB mouse then
# this input device can be used in AlwaysCore mode to let you
# also use USB mice at the same time.
Identifier "DevInputMice"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Generic Extended Super VGA, 800x600 @ 60 Hz, 640x480 @ 72 Hz"
HorizSync 31.5 - 37.9
VertRefresh 50.0 - 70.0
Option "dpms"
EndSection

Section "Device"
Identifier "Videocard0"
Driver "xxxx"
VendorName "Videocard vendor"
BoardName "xxxx"
VideoRam xxxx
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "800x600" "640x480"
EndSubSection
EndSection

Section "DRI"
Group 0
Mode 0666
EndSection

 
Okay, I think I can recall how to do this. RedHat is a little different to other distributions. Here are the steps:

1. First, cd into the following directory.
# cd /usr/X11R6/lib/X11/fonts/

2. See what is in the directory
# ls -l

3. If there is no folder TTF or TrueType, make one.
# su
# <password>
# mkdir TTF

4. Copy all the *.ttf windows fonts in to this folder
# cp /tmp/*.ttf / /usr/X11R6/lib/X11/fonts/TTF
(copy them from the directory you have them in)

5. Make the fonts.scale and fonts.dir file
# cd /usr/X11R6/lib/X11/fonts/TTF
# /usr/sbin/ttmkfdir > fonts.scale
# /usr/sbin/ttmkfdir > fonts.dir
(You may need to download ttmkfdir if you don't have it)

If you can't get it to work that way, try:
# cd /usr/X11R6/lib/X11/fonts/TTF
# /usr/X11R6/bin/mkfontscale
# /usr/X11R6/bin/mkfontdir

4. Add the new font directory to xfs's search path
# /usr/sbin/chkfontpath --add /usr/X11R6/lib/X11/fonts/TTF

5. Restart xfs
# service xfs restart
-OR-
# /etc/rc.d/init.d/xfs restart
-OR-
you can log out and log back in

--> You should now have your true type fonts working. If you are happy with how everything is working, skip this last step. Otherwise, if you want your new fonts to override the old fonts, you'll need to rearrange
the order of lines in the 'catalog' line of the file managed by chkfontpath, /etc/X11/fs/config.

1. open the file /etc/X11/fs/config
2. Move the TrueType fonts directory to the top of the list, e.g:

catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
/usr/X11R6/lib/X11/fonts/100dpi:unscaled,
/usr/X11R6/lib/X11/fonts/75dpi:unscaled,
/usr/X11R6/lib/X11/fonts/misc,
/usr/X11R6/lib/X11/fonts/Type1,
/usr/X11R6/lib/X11/fonts/Speedo,
/usr/X11R6/lib/X11/fonts/75dpi,
/usr/X11R6/lib/X11/fonts/TTF

Becomes:

catalogue = /usr/X11R6/lib/X11/fonts/TTF,
/usr/X11R6/lib/X11/fonts/misc:unscaled,
/usr/X11R6/lib/X11/fonts/100dpi:unscaled,
/usr/X11R6/lib/X11/fonts/75dpi:unscaled,
/usr/X11R6/lib/X11/fonts/misc,
/usr/X11R6/lib/X11/fonts/Type1,
/usr/X11R6/lib/X11/fonts/Speedo,
/usr/X11R6/lib/X11/fonts/75dpi




 
AP81, you may want to kill me for posting after a month! But I was having some problems, which are almost sorted out. BTW I got my TTF fonts to work in StarOffice thanx to ur explanation. But I cant use these fonts to change the fonts used to display menus and other stuff in KDE. Like the Title Bar font.

Could you guide me as to how to use them?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top