Using TrueType fonts in Solaris ------------------------------- Believe it or not, TrueType support is already built into Solaris and OpenWindows (ie: X) right out of the box! It's really easy to get TrueType working, and you DON"T need root access to do it. Let's walk through it. Step 1) Create a directory to install your fonts in. Say, /home/benr/fonts Step 2) Copy your TrueType fonts into this directory. Step 3) Solaris will NOT allow uppercase file extentions for TrueType fonts. Therefore, rename "CreamPuf.TTF" to "creampuf.ttf". Step 4) Create a "fonts.dir" in your font directory. Despite what some people will tell you, just use this formula: - The first line of the file is the number of fonts listed in the file. So if you are listing 5 fonts, the first line just says "5". - The following lines follow this convension: filename.ttf -misc-FileNameISee-medium-r-normal--0-0-0-0-p-0-iso8859-1 You can't use mkfontdir like you'd like too because it doesn't understand ttf fonts. So just ignore that tool. In all cases, just use the above template. Only two things change from line to line: "filename.ttf", and "FileNameISee". The second items mentioned is the name you actually see in the FontBox later, say in GIMP. This is the only place you can put spaces (short of the break between the filename and the descriptor). Try avoiding odd chars like "'", and stuff. Step 5) Now, run "xset fp+ ". Ex: xset fp+ /export/home/benr/fonts Step 6) If you didn't get an error, your doing great. If you DO get an error, usually "bad font path element (#42)", then you messed up in your fonts.dir. Doublecheck it and remember what I said about file casing, space and stuff. Step 7) Now, the final touch, run "xset fp rehash". BOOM! Your done. Open GIMP or some tool that uses TrueType fonts and start plugging away. If you get errors from applications, where you can see the font, but when you try to use it you get a "You can't use this damned font!" type message, then doublecheck your fonts.dir. I can't stress just how picky this file is. Please note that for this proccess you DON'T NEED ROOT! Not for any part of it, which is nice 'cause you don't need to mod system directories either. This gives every user their own little font space. To make these changes "perminant", you need to edit your .xinitrc. I think the easiest way to explain is to just show you mine: #!/bin/sh #Safety Term for Console Messages... xterm -C & #Set all the font junk in place xset fp+ /export/home/benr/fonts xset fp rehash #Start E. exec /usr/local/enlightenment/bin/enlightenment Note that you don't need to background the xset's. If eveything worked after you setup your font directory, this'll keep you happy each login. If you need more info on TrueType fonts in Solaris you can check the Font PSD on SunSolve (sunsolve.sun.com). As a side note, default system fonts go in /usr/X/lib/X11/fonts/TrueType. If you wish to setup fonts system wide rather than just for single users, you'll want to start digging in that directory, and check the forementioned PSD on SunSolve. Appendix: Here's my fonts.dir, in my /export/home/benr/fonts directory: -------Start - Don't Include this Line----------- 6 trenu___.ttf -misc-TrendyUniversity-medium-r-normal--0-0-0-0-p-0-iso8859-1 kinkie__.ttf -misc-Kinkie-medium-r-normal--0-0-0-0-p-0-iso8859-1 jettat.ttf -misc-JettaTech-medium-r-normal--0-0-0-0-p-0-iso8859-1 jetta.ttf -misc-Jetta-medium-r-normal--0-0-0-0-p-0-iso8859-1 Concf.ttf -misc-Concielian-medium-r-normal--0-0-0-0-p-0-iso8859-1 creampuf.ttf -misc-Cream Puff-medium-r-normal--0-0-0-0-p-0-iso8859-1 --------Das Ende - Don't Include this Line----------- ------------------------------------------------------------------------- ------------------------------------- Ben Rockwood - benr@cuddletech.com-