Note, this article discusses what I had to do to get TrueType fonts working on a system on which SuSE Linux 9.0 had been installed. Other versions of SuSE Linux had slightly different procedures:
Making TrueType fonts work with SuSE 9.2 (very easy).
The directory that is going to contain the TrueType fonts must be permanently available while the X graphics system is running. Let us imagine that the directory is called /usr/TrueTypeFonts. Of course, you can call it something else if that is more convenient — just don't forget what you call it!
Copy the .TTF files for the required TrueType fonts to the directory you just created. After copying the files, make sure that their file permissions are set to allow read access by anybody.
It is necessary to convert all the file names to lower case and to remove any space characters that the names contain. If any file names contain spaces then you will have to rename them by hand, unless you have a clever program to do it for you. However you might be happy to know that the following script will perform the tedious job of converting all the names to lower-case.
Create an executable text file containing the following script:
#!/bin/sh # ## -------- convert upper to lower case --------- ls * | while read f do if [ -f "$f" ]; then if [ "$f" != "`echo \"$f\" | tr A-Z a-z`" ]; then #Note that 'This' will overwrite 'this'! mv -iv "$f" "`echo \"$f\" | tr A-Z a-z`" fi fi done # Note the punctuation -- the backquotes are # important! Remove any spaces from font names # too. # (Thank you Gary Hoberg for pointing offering a # useful improvement to the script originally # presented on this page) # ---------------------- # eof
Well, I don't suppose you really want to type that little lot do you? And even cutting and pasting can be a real nuisance sometimes so here is a link to a text file that contains the above script: text file with script. You still have a little work to do because you will still need to set the correct permission bits to make it executable and put it in the right place — don't just go rushing off to execute it wherever it happens to be because then bad things might happen.
The working parts of this script were originally copied from another web site (*). It will convert all the font file names to lower case and then compile two necessary files. This script file must be placed in the directory that contains the font files and executed from there.
To save yourself a little puzzle later please note that the script file will rename everything in the directory, including itself, so you might as well give it the script lower-case name to start with. Also if you get a message that says something about a binary operator expected on line 7 then it is likely that your file names contain spaces and you have missed some of the double quotes in the script. File names that have spaces in them need to be double-quoted or they won't get renamed properly, or at all, and, depending on the actual name of the file, might cause other undesirable side effects. So, you get the idea I'm sure, either remove the spaces first or make sure you have placed all the double-quotes correctly.
Also please note that the programs used by the script might have extra options that are pertinent to your situation or requirements so you might do yourself a favour by finding and reading and any appropriate documentation.
Life is simpler and less confusing if the X-server is not running while you do all of these things. If you are logged-in as root at an ordinary text console then you can type “init 3” to stop the X-server. Later you will restart it with the command “init 5”.
Well, if you have edited the script appropriately, put it in the right place and set the permission bits correctly then now you can go ahead and run the script just created. When it has completed its work all of the file names should have been changed to lower case. One possible problem is that if you had two files that have the same name with different cases (for example “penguin.ttf” and “PENGUIN.TTF”) then the script will not perform correctly. Make sure that each font is represented by only one TTF file.
You need to create some links to your font files so that the X-server knows where to find them. If you have a standard installation then the X-server already has a directory for true type fonts. That directory is: /usr/X11R6/lib/X11/fonts/truetype
Relocate yourself to that directory and then execute the following command:
ln -s /usr/TrueTypeFonts/*.ttf .
Naturally, if you didn't put your fonts into a directory called /usr/TrueTypeFonts then make sure you use the name of the directory that you did create.
While logged-in as root at a text console type the following simple command.
SuSEconfig -module fonts
While logged in as root, type the command init 5. Once the computer tells you that runlevel 5 has been reached, you can press ALT-F7 to switch to the graphics console.
At this stage my TrueType fonts were available for use. If further help is needed then refer to en.tldp.org/HOWTO/FDU/truetype.html or find some other helpful web document.
Since I was using a postscript printer (a Kyocera FS1700 with postscript option) I did not need to do any further work to get the fonts to print.
The Opera browser needed to be told to start using some of the newly installed fonts. This was achieved through the “preferences” dialogue boxes, obtained from the pull down menus or by pressing ALT-P.
For some reason I couldn't find the “preferences” option button on my desktop menu — I'm sure it used to be there but fortunately it isn't difficult to create a special button. A preferences button can be added to the panel with the following simple steps:
Once the button is installed in the panel you can click the button and then choose “appearance and themes” followed by “fonts”. This should bring up a small font configuration window that allows you to select the fonts for the desktop, menus and so on. All of your newly installed TrueType fonts should be available to pick from.
End of article