From: jay@m5.chi.il.us (Jay F. Shachter)
Subject: Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters
Date: 3 Dec 2002 07:14:38 -0800 [thread overview]
Message-ID: <6525a5d7.0212030714.47277179@posting.google.com> (raw)
I have solved the problem of Emacs's failure to display latin-1 hyperascii
characters -- even though XEmacs was displaying them perfectly -- and in solving
the problem, discovered a fascinating albeit esoteric subtle difference between
Emacs and XEmacs, at least in my computer environment, and perhaps in yours too.
The problem could not have lain in my .emacs startup file, as someone else
quite reasonably suggested, because I use the same .emacs startup file for both
Emacs and XEmacs. The problem lay with the X resource database, which had a
different value for xemacs.font than for emacs.font. Consequently, emacs
started up with a font (specifically, "6x12") that does not have hyperascii
characters. Therefore, Emacs did the intelligent and sensible thing by choosing
ascii characters which resembled the hyperascii latin-1 characters in
appearance, e.g., displaying "é" as "e".
The fascinating and esoteric part is why the X resource database was set up in
this way. Here's the answer. The value in the database for xemacs.font was
"-itc-courier-medium-r-normal--10-100-75-75-m-0-iso8859-1". Now, this string
as such does not appear in the output of xlsfonts, because it is a scalable
font. The output of xlsfonts contains the unscaled name of the font, which is
"-itc-courier-medium-r-normal--0-0-0-0-m-0-iso8859-1". Replacing the first
four 0's with 10-100-75-75 produced a fontname which is perfectly acceptable
to XEmacs (and to xfd, for that matter).
Emacs, however, exits with a fatal error when given that fontname, complaining
that "no fonts match" the specified name. That is why the administrator of
the X resource database gave up on Emacs, and instructed it to use "6x12".
But I found a better solution. I changed the X resource database so that
emacs.font is now "-itc-courier-medium-r-normal--10-100-75-75-m-60-iso8859-1".
What's the difference between that value and the value that satisfied XEmacs?
Only that the width field is explicitly specified for Emacs to be 60, whereas
XEmacs was satisfied with a 0 in the width field. Everything is now working
perfectly, Emacs is now using the same font as XEmacs, and it is displaying
hyperascii latin-1 characters beautifully.
The larger, unanswered, question, of course, is why Emacs insisted on a value
in the charwidth field of the fontname, whereas XEmacs and xfd were satisfied
with a zero when the font was a scalable font, and the scaling informating was
available elsewhere. It is not an XLib error. I wrote a program that does
an XLoadQueryFont on the fontname used by XEmacs, and the XLoadQueryFont
succeeded, generating the appropriate XFontStruct value. When Emacs is given
that fontname, however, it complains that "no fonts match" it, apparently
without even trying to do the XLoadQueryFont.
What is the reason for this bizarre behavior?
Jay Shachter
jay@m5.chi.il.us
next reply other threads:[~2002-12-03 15:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-03 15:14 Jay F. Shachter [this message]
2002-12-03 16:13 ` Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters John Paul Wallington
2002-12-04 19:21 ` Jay F. Shachter
2002-12-05 13:43 ` John Paul Wallington
2002-12-05 16:16 ` Michael Hudson
2003-01-01 1:57 ` David Combs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6525a5d7.0212030714.47277179@posting.google.com \
--to=jay@m5.chi.il.us \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.