On Fri, 02 Nov 2001 04:38:50 +0900, "Stephen J. Turnbull" said:
>>>>> "Valdis" == Valdis Kletnieks
<Valdis.Kletnieks(a)vt.edu> writes:
Valdis> Given that fontsets exist to solve an actual problem (that
Valdis> you may not have one font that covers the charspace, but
Valdis> can use several related fonts to cover), what do you
Valdis> propose to replace the fontset support that you wish to
Valdis> get rid of?
The existing superior solution: faces.
Superior it may be. However, checking the FAQ that came with XEmacs:
Q3.2.2: How do I set the text, menu and modeline fonts?
-------------------------------------------------------
Note that you should use `Emacs.' and not `Emacs*' when setting face
values.
In `.Xdefaults':
Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
Emacs*menubar*font: fixed
Emacs.modeline.attributeFont: fixed
This is confusing because modeline is a face, and can be found listed
with all faces in the current mode by using `M-x set-face-font (enter)
?'. It uses the face specification of `attributeFont', while menubar
is a normal X thing that uses the specification `font'. With Motif it
may be necessary to use `fontList' instead of `font'.
Hmm... that was helpful. Really. Doesn't explain how to use a face instead
of a fontset.
There's nothing about faces in the "Internationalization" section of the
FAQ.
There's nothing about setting faces for this in the sample.emacs
OK.. Let's go look around in the menubar. "Options" has "Edit
faces",
go poking around there for a while, and finally find 'default' face in
the 615-line buffer. Right mouse on the little arrow, and *aha*, we
have 'Font Family'. Hmm... what does it want? I can *guess* that it
wants 'Size' as either pixels or points - but it's unclear which. The other
attributes.. Hmm.. pixmap it probably wants a pathname. A bunch of toggles.
Foreground/Background, I'm *guessing* it wants a color specifier, not clear
if it wants an #rrggbb value, or a (1.0,1.0,1.0) style, or a name from
the rgb.txt file, or whether it's smart enough to guess what I mean. But
"Font Family"? Say I want Helvetica - can I specify 'adobe-helvetica',
or do I have to hope it doesn't guess helvetica from the alias, cronyx, or
urw foundries? Or does it want 'adobe helvetica'? Hmm.. that might be
fun if I wanted 'new times roman' that has blanks in the XLFD....
(As an aside - I did 'control-h ? ?' and here's what it *said*:
C Customize Emacs options.
C-d How to obtain XEmacs.
e Information about the most recent error.
F Local copy of the XEmacs FAQ.
Hmm... so C-h C gets us help on how to *use* this Customize?
Nope, it *invokes* customize. Blech. The *other* choices near it
in the list produce *info* - control-h C-d doesn't download XEmacs,
it tells you how to do so).
So the score is now Customize 2, user 0.
OK.. 'C-h a face', and start digging. Not much stuff that has
the little asterist that says it's user-callable.
Going and looking at the docstring for set-face-font points you to
make-font-specifier. That says:
Compiled Lisp function,
(loaded from "/home/valdis/src/xemacs-21.2/lisp/objects.elc"):
arguments: (spec-list)
Return a new `font' specifier object with the given specification list.
SPEC-LIST can be a list of specifications (each of which is a cons of a
locale and a list of instantiators), a single instantiator, or a list
of instantiators. See `make-specifier' for more information about
specifiers.
Valid instantiators for font specifiers are:
-- a string naming a font (e.g. under X this might be
"-*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*" for a 14-point
upright medium-weight Courier font)
-- a font instance (use that instance directly if the device matches,
or use the string that generated it)
-- a vector of no elements (only on TTY's; this means to set no font
at all, thus using the "natural" font of the terminal's text)
-- a vector of one element (a face to inherit from)
Now... how is a poor novice user who just *knows* "this fontset works just
fine for me everyplace else" supposed to figure out how to specify
a face without using a fontset?
OK.. Maybe the answer is in the User's Guide someplace, I'll have to
investigate that once I figure out why RedHat's texinfo-4.0c-1 does this:
make[1]: Entering directory `/home/valdis/src/xemacs-21.2/man'
makeinfo -P xemacs -o ../info/xemacs.info xemacs/xemacs.texi
xemacs/programs.texi:1036: First argument to cross-reference may not be empty.
makeinfo: Removing output file `../info/xemacs.info' due to errors; use --force to
preserve.
make[1]: *** [../info/xemacs.info] Error 2
/Valdis (who just spent 45 minutes *trying* to implement the superior
solution).