|
A common task faced by many people using Solaris is how to add their own custom fonts to a Solaris machine and get X11 to use them. While Solaris ships with many high quality type faces it is occasionally desirable to add additional fonts (for example type faces not shipped by Solaris). Doing this in X11 can be frought with difficulties and errors. The following is a very simplified guide to adding TrueType (.ttf) fonts to a Solaris user's account. Requirementsttmkfdirttmkfdir is a useful utility which queries fonts and extracts the necessary information to make a fonts.scale file for use with X11. This removes the necessity to create these files by hand which can be very tedious and error prone. ttmkfdir is available from http://freshmeat.net/projects/ttmkfdir. FreetypeThis is a requirement for ttmkfdir. This is available form http://www.freetype.org/. C CompilerYou can either use gcc or Forte cc. These are only needed if you don't have a compiled ttmkfdir and freetype available. Installing Required SoftwareFirst get the freetype-1.3.1.tar.gz and ttmkfdir.tar.gz archives from the above links. Then go into a working directory and do the following:
The above steps should give you a ttmkfdir binary which can be used to setup fonts. Adding Fonts to Your AccountIf you have a set of TrueType fonts you wish to add to your own X session then you can simply create a directory in your home directory and add the fonts using the steps below:
This will create a directory called .fonts (hidden from view by default) in your home directory into which you can copy fonts. After the fonts have been copied a set of commands are run to create the necessary configuration files and to update your X11 session with the new fonts. Unfortunately by default your X11 session will lose the new fonts on a restart. There are a few ways to make this permanent, the simplest being creating ~/.xinitrc and adding the xset lines to it. For example add the following to your ~/.xinitrc: if [ -d $HOME/.fonts ] FutureWith the advent of the GNOME 2 desktop environment Sun is investing in newer font technologies which will allow automatic and transparent addition of fonts. At this time ~/.fonts will be the default directory looked in for user fonts so no additional work will be needed to use the newer technologies with your fonts. |
| |||||||||||||||||||||||||||||||
|
| ||||||||||||