| XLoadQueryFont takes a font name which is NOT the same as the file name of the
font. The following is a copy of a note posted in the old VAXNOTES_V20_IFT
conference. It describes the X11R3 font naming conventions.
Dick
================================================================================
Note 117.3 NOTES -> DECWindows font selection. 3 of 5
KALKIN::BUTENHOF "VMS RTL, Common Multithread" 79 lines 15-NOV-1988 08:46
-< Customizing, and DIGITAL/MIT FONT NAMING STANDARD tutorial ("it' >-
--------------------------------------------------------------------------------
.2: Don't just copy the system NOTES$DEFAULTS.DAT and edit it. That makes the
resource manager load two copies of the same file (mostly identical). It's
wasteful, and makes it more difficult to remember what you changed. Instead,
use the system defaults file as a guide to find the widget and resource names
that you want to change, and create a new private NOTES$DEFAULTS.DAT with
only those specific resources in it.
.1: A lot of people seem to be really confused about the new font names. First
off, don't bother with a directory of the fonts; the file names are meaningless.
Instead, use a program which lists font names matching some pattern. I posted
one in ELKTRA::DW_EXAMPLES recently, for example.
Anyway, maybe it's worth a quick tutorial. The following describes the font
name format for DECwindows as of BL11.2 (and for FT2.1 and later), and also
for the MIT R3 release. Earlier DECwindows versions used a slightly different
format (I'll mention some of the differences in passing).
There are 15 fields, each separated by "-". Therefore, a full wildcarded name
is
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
The fields are:
1. Font registry. In the old form, this was usually DEC. Now it's blank,
to indicate that the font is registered by the X consortium. Unless, of
course, it's not (some will inevitably appear).
2. Foundry (who designed the font). Most DECwindows fonts are Adobe. Some
are Bitstream, a few are DEC.
3. Font family. Helvetical, Courier, Terminal, Times, etc.
4. Weight. Medium, Bold, Demi, etc. You need to list the fonts in a family
to know which are applicable; some have Medium and Bold, some have Demi and
Book (for example).
5. Slant. Most are "R" (Regular). Some are "I" (Italic) or "O" (Oblique).
Italic and Oblique are visually similar, but typographically distinct.
6. Width. I suspect this is a crock for terminal emulators. Most are
"Normal". Some terminal fonts are "Narrow", or "Wide", or "Double Wide".
7. This field is always "_" under the old standard, and null in the new
standard. I don't remember what it means, if anything.
8. Pixel size of the font. For example, a 75dpi 12 point font is "12",
a 100dpi 12 point font is "17". Note that you shouldn't use this to
select on font size, even if you want it to be dependent on the screen
resolution; it could be the same for a 75dpi font and a 100dpi font
(or some other resolution) of different point sizes.
9. Point size, in decipoints. E.g., "120" for 12 point. This is independent
of screen resolution, and is what you should normally use for selecting
font size.
10. X resolution (DPI). "75" for 75dpi, "100" for 100dpi.
11. Y resolution (DPI). "75" for 75dpi, "100" for 100dpi.
12. Spacing. "P" means "proportional" (not all characters in the font have
the same width). "M" means "monospaced" (e.g., Courier font), where all
characters have the same width. The new standard adds "C" for character
13. Average width of font (I don't remember how this is measured, and it's
not usually interesting).
14. Character set registry. Usually ISO8859 (international standard). Some
fonts (like DECtech) have character sets "registered" by DEC.
15. Character set encoding. "1" combined with registry ISO8859 means the
ISO-Latin1 encoding (font name ending with -ISO8859-1", which used to
be "-DEC-ISOLatin1"). Adobe SYMBOL font is "-Adobe-Fontspecific".
Now you know most of what the experts know about (X) font naming; so have fun
customizing.
/dave
|