Fonts

NOTE/WARNING: The installation comments here are all very out-of-date. I haven't used SuSE Linux for quite some years now, and have recently abandoned even KDE. Still, some of the comments about underlying commands might be useful (or not).

1. To Install a New TrueType Font Package

To install a new "TrueType" font in SuSE 10.0, running KDE, first bring up the KDE Control Center from the GUI "start" (SuSE chameleon) button (or run it from the command line as "kcontrol"). Select the "System Administration" option, and then the "TT Font Installer". Optionally select "System Adminstrator" mode for systemwide installation (I didn't, since I'm the only user on my desktop system). Click on "Add Fonts" Point it at a .ttf font file (whereever you put it). It installs the fonts (for local user) in $HOME/.fonts Restart your applications (e.g., Mozilla)

Mozilla and The GIMP just seem to pick up the newly installed fonts. I haven't yet figured out how to make xterm, mlterm, or vi display Cypriot Syllabary, even when Mozilla does.

2. To Investigate the Fonts Already Installed

On newer systems using the "fontconfig" mechanism, use the "fc-list" program:

 
$ fc-list | grep Code 
Code2001:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normalan,Normálne,Navadno,thường,Arrunta 

The older X mechanism is probably still present, for which "xlsfonts" is useful:

 
$ xlsfonts | grep code 
-jjk-code2001-medium-r-normal--0-0-0-0-p-0-iso10646-1 
-jjk-code2001-medium-r-normal--0-0-0-0-p-0-iso8859-1 
-jjk-code2001-medium-r-normal--0-0-0-0-p-0-iso8859-15 
-jjk-code2001-medium-r-normal--0-0-0-0-p-0-microsoft-ansi 
-jjk-code2001-medium-r-normal--0-0-0-0-p-0-microsoft-cp1252 
-jjk-code2001-medium-r-normal--0-0-0-0-p-0-microsoft-win3.1 

The xfd program is useful for displaying a font. Cut and paste in the font name from xlsfonts' output:

 
xfd -fn -jjk-code2001-medium-r-normal--0-0-0-0-p-0-iso10646-1 & 

Try also:

 
$ fc-match :lang=grc 
albw.ttf: "Albany AMT" "Regular" 

I find it useful to bring up the "inkscape" SVG drawing program, type in some text (including both regular ASCII and, say, accented Greek), and then examine how it changes as I change the fonts. Since inkscape falls back on the systemwide fonts for characters not present in the selected font, it's often easy to see which fonts have no glyphs in the character positions I'm viewing. (Fonts with no characters at all for character code points in question (such as Chinese when I'm typing Latin 1 / ASCII) will show no change at all from the systemwide defaults.) This helps me to avoid the mistake of thinking that a particular font looks nice in the range I'm considering when in fact it's empty there and I'm seeing only the default. (Of course, xfd accomplishes this same end by simply not showing anything in those code positions, but xfd doesn't display combining characters as combining.)

3. To Specify Fonts

3.1. fontconfig and ~/.fonts.conf

In newer systems using the "fontconfig" mechanism, the system-wide fonts are configured in "/etc/fonts/fonts.conf". In SuSE Linux, they've added some additional files which get included into it. It's best to read through the actual configuration files, and the "man" pages for "fc-list", "fc-match", and "fc-cache". The actual manual for "fontconfig" is in: "/usr/share/doc/packages/fontconfig/fontconfig-user.html". These configuration files define, inter alia, the systemwide defaults and fallback sequence for the generic family names such as "serif", "sans-serif", etc.

The systemwide defaults for the generic family names can be reported with the "fc-match" program. Thus, on SuSE 10.0:

 
$ fc-match "serif" 
thowr___.ttf: "Thorndale AMT" "Regular" 

Examining "/etc/fonts/suse-post-user.conf", I find that, indeed, "Thorndale AMT" is the second in the list of (many) fonts for which "serif" is an alias. (Presumably the first in the list, "Times New Roman", is not in fact present.)

To force a particular font to become the preference for "serif", etc., I could edit these "/etc/fonts/*" files, or, better, I could put a ".fonts.conf" file in my home directory. Here's an example:

 
<?xml version="1.0"?> 
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> 
<fontconfig> 
<dir>~/.fonts</dir> 
<alias> 
<family>serif</family> 
<prefer><family>Nimbus Roman No9 L</family></prefer> 
</alias> 
<alias> 
<family>sans-serif</family> 
<prefer><family>Nimbus Sans L</family></prefer> 
</alias> 
<!-- test with something very different 
<alias> 
<family>serif</family> 
<prefer><family>zekton</family></prefer> 
</alias> 
<alias> 
<family>sans-serif</family> 
<prefer><family>zekton</family></prefer> 
</alias> 
--> 
</fontconfig> 

This sets up two fonts from the "Nimbus" set as the defaults for "serif" (Nimbus Roman No9 L) and "sans-serif" (Nimbus Sans L). (I've also included, commented out, a font of very different appearance. This is useful for testing - to make sure that I can actually see a change happening.)

It isn't necessary to refresh the font mechanism itself in order for changes in "~/.fonts.conf" to take effect. To see if they have taken effect, do, e.g.:

 
$ fc-match "serif" 
n021003l.pfb: "Nimbus Roman No9 L" "Regular" 

When a preferred font so specified doesn't actually exist, it is ignored silently (so it's best to check in this way).

3.2. Mozilla Fonts

I can't say that I really understand the details of Mozilla font configuration, but here at least is my understanding as of Mozilla 1.7.11.

The fonts dialog is available via: Edit -> Preferences -> Appearances -> Fonts

The check-box for "Allow documents to use other fonts", if UNchecked, forces the use of the Mozilla font specifications of this dialog box. These in turn can be either explicit specifications of individual fonts (e.g., "Bitstream Vera Serif") or generic specifications of font families (e.g., "serif"). If the former, they specify individual fonts (but I'm not sure how the fallbacks work if the fonts aren't really there). If the latter, then they in turn point to the system font configuration (which has an elaborate fallback mechanism).

If CHECKED, this box allows document (or document's CSS) specified fonts to override the Mozilla font specifications.

Changes in this box take effect immediately upon closing (with "Ok") the Fonts dialog.

However, changes to the Mozilla font specification (explicit or generic) do not seem to take effect until Mozilla is exited and restarted. This can be confusing, as document-specified font changes (if allowed) can take effect without restarting Mozilla, but Mozilla-specific font changes (whether explicit here or passed through by reference to the fontconfig configured systemwide fonts) require a Mozilla restart.

It seems to make some sense, then, to do this:

1. Check "Allow documents to use other fonts."

2. Set "Proportional" to "Serif"

3. Set "Serif" to "serif"

4. Set "Sans Serif" to "sans-serif"

5. Set "Cursive" to ?

6. Set "Fantasy" to ?

7. Set "Monospace" to "monospace"

This basically:

A. Ignores the Mozilla font specification.

B. Falls back first to CSS (or HTML) font specifications in the document (which can take effect without a Mozilla restart).

C. Falls back then to the systemwide fontconfig specifications, including those of "~/.fonts.conf" (which require a Mozilla restart).

4. Remote X Displays

When I'm running the application (e.g., Mozilla) on a remote server (e.g., the noisy box in the basement) and displaying it on another (the somewhat quieter box in my office), I do all of the font configuration on the server running the application, not the server displaying it.

5. Problem with Macron vs. Circumflex

Some fonts have apparently encoded a straight overbar (which is, basically, a macron or "long mark") for (at least) the combining circumflex accent. In the first example below, the iota is marked with a combining circumflex accent (U+0342). This should show up, optimally, as a sort of an upward-pulled curve, or, at least minimally, as a tilde. If it shows up as a straight overbar, then the font you're using is not displaying a useful circumflex.

ῖ

The second example, below, encodes an iota with a precomposed circumflex (all together as U+1FD6). It should appear the same as the example above.

The third example, below, has an iota marked with a combining macron (U+0304). It should display with a straight overbar.

ῑ

6. Specific Fonts

I've yet to find a font that displays clearly the diacritical marks required for polytonic Greek plus its prosodic analysis.

The following fonts, stock on SuSE 10.0, work reasonably well for ancient Greek (but none really combine the macron and breve well). Often the "sans serif" variants work the best, as, with all the fiddly bits of the accents, the serifs just add to the visual confusion.

The popular "SPIonic" font (free for noncommercial use, not stock on SuSE 10.0) is not encoded for Unicode and thus not useful to me.

The following font(s), stock on SuSE 10.0, attend to the IPA.

The "Code2001" beta freeware fonts have Cypriot Syllabary http://home.att.net/~jameskass/ ("Code2000" is (very inexpensive) shareware, but I think Code2001 is freeware; I hope I'm not wrong on this.)


Select Resolution: 0 [other resolutions temporarily disabled due to lack of disk space]