Figuring Out the Font System on Linux Desktops?
koreth asks: "Last year I switched to Debian sarge on my office desktop machine. For the most part it's been great, but I can't seem to wrap my brain around fonts. For example, my favorite programming font is Sheldon Narrow. After running it through a few conversion tools and copying it to various font directories, I was able to start using it in xterm. But no sign of it in Konsole, despite running it through KDE's font installer tool. A few times I've installed new fonts that appear in the font lists of GNOME apps but not KDE apps or vice versa, and it's unclear to me how either environment's fonts interact with what I see when I run 'xlsfonts'. I have yet to find any documentation describing how either GNOME or KDE decides which fonts it likes. And then there's Debian's 'defoma', which seems to interact with everything somehow. Are there any good resources out there for learning what's going on under the hood of a modern Linux desktop environment's font subsystem?"
The Linux Documentation Project is a good place to start. Here is an article about the optimal use of fonts. It has a section called "Why Fonts on Linux Aren't Straight Forward?" and a section called "The Easy Steps to Enlighten Your Desktop" with KDE, Gnome, OpenOffice.org, and FireFox configuration examples.
One of the things that helped me install fonts is this paper. Yes, it's from the FreeBSD handbook, but nearly all of it deals with just X11 and not FreeBSD-specific.
A few little tips; you might want to install the Microsoft web fonts (they're free as in beer and pretty nice) as well as the Bitstream Vera fonts. If you have a Windows box, you can copy those fonts, put them on your *nix box, and update the fonts database by typing ttmkfdir > fonts.dir where the TrueType fonts are stored.
Pretty much, my experience with fonts have been, for the most part, pretty good. I'm using FreeBSD with Window Maker, so no, I don't have all of the nice KDE/GNOME bells and whistles, so my fonts might not look as good. However, it is a great idea to get a nice understanding of how fonts work under X11. You never know when you need it....
As for the Sheldon font, X11 comes with a program called xfontsel. (Yes, it's ugly and it comes from the bad old days of X, and its description of fonts is a stark departure from Windows/Mac, but it does the job). Anyways, look under the fmly menu and see if your font is located there.
There basically two font subsystems on X, the old X core fonts and the new fontconfig.
:)
/etc/fonts/local.xml.
.fon files are supported, so you don't even need to convert them.
X core fonts are the old standard X11 stuff, with FonthPaths, fonts.dir and fonts.scale files, and lots of other nastiness. It has trouble with scalable fonts, it can't deal at all with complex scripts (such as Syriac or Indic scripts), and it can't do anti-aliasing or sub-pixel rendering ("ClearType"). Also it's completely useless if you want to print something.
The new way, with fontconfig, is completely seperate (and in fact independent from X) and basically fixes all these flaws (but it introduces the nastiness of XML config files). By now the only interesting application that hasn't been converted yet is Emacs.
(I say "with fontconfig", but it actually consists of three parts: fontconfig, which keeps a database of fonts; freetype, which renders them; and xft, which connects it all with X.)
Now defoma. Defoma is something Debian specific. It's used by Debian font packages to register themselves with every font-using thing installed. As you look at the list of limitations of X core fonts, you can imagine quite a lot of programs have grown their own font systems. I don't think anybody really understands how defoma works, and you can safely ignore it.
To get a bit more concrete: you have successfully configured the X core fonts system to use your font, and discoverd pretty much nothing uses it anymore
To install a font, the modern Linux way, drop it in the ~/.fonts directory (create the directory if it doesn't exist yet). Or, alternatively, add the directory where you put the font to
BTW, I think Windows
dpkg-reconfigure fontconfig, and choose "yes" when asked about bitmapped fonts.
It's a good idea to install the x-ttcidfont.conf (or whatever it's called) package and follow the directions in /usr/share/doc/x-ttcidfont-conf/README.Debian.
Other than that, I recommend you don't try to understand the font mechanisms, but just try to forget they're there; it's easier that way.
"That's all I have to say about that" --Forrest Gump
For a resolution of 1280x960, aiming for 96 DPI gets you 25.4*1280/96 = 339 mm and 25.4*960/96 = 254 mm (gee, that was a hard equation!
To see your current DPI settings, open an xterm and type "xdpyinfo|grep inch" (or is it "Inch"?)
What time is it/will be over there? Check with my iPhone app!
And in any event even if there were a version of the right font, that wouldn't help me know what to do the next time I came across a font that didn't work. Which is really the larger point of the posting here.
This may be of some use:
t ml
;-)
http://xorg.freedesktop.org/X11R6.8.2/doc/fonts.h
These may help with your next question
http://www.cl.cam.ac.uk/~mgk25/unicode.html
http://www.gentoo.org/doc/en/utf-8.xml
Use KDE's font installer to install and manage fonts, it just works. Handles TrueType and Type 1 fonts, just drag and drop to install.
There's TeX and LaTeX and METAFONT... but for those, I suggest you use pdftex and pdflatex and use Type 1 fonts, rather than going through the whole "building multiple sizes of METAFONT-rendered bitmaps" thing. Ideally, use the native PDF fonts to keep your PDFs down in size.
There are also various old bitmap X fonts hanging around on my system. I don't deliberately use any of them, but I leave 'em there in case there are applications I need that don't handle scaleable TTF/Type1 yet.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
I recommend you read the Unix Haters Handbook. It partly explains the mess that you seem to be curious about.
Read the chapters "Terminal Insanity" and "The X-Windows Disaster", although they doesn't really discuss fonts much, they give some insight into the *cough* design *cough* of Unix, and hopefully make you give up on your story idea like it did to me.