* Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters
@ 2002-12-03 15:14 Jay F. Shachter
2002-12-03 16:13 ` John Paul Wallington
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jay F. Shachter @ 2002-12-03 15:14 UTC (permalink / 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters
2002-12-03 15:14 Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters Jay F. Shachter
@ 2002-12-03 16:13 ` John Paul Wallington
2002-12-04 19:21 ` Jay F. Shachter
2002-12-05 16:16 ` Michael Hudson
2003-01-01 1:57 ` David Combs
2 siblings, 1 reply; 6+ messages in thread
From: John Paul Wallington @ 2002-12-03 16:13 UTC (permalink / raw)
Jay F. Shachter wrote:
> 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?
Perhaps it is related to the value of `scalable-fonts-allowed', which
is nil by default.
--
John Paul Wallington
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters
2002-12-03 16:13 ` John Paul Wallington
@ 2002-12-04 19:21 ` Jay F. Shachter
2002-12-05 13:43 ` John Paul Wallington
0 siblings, 1 reply; 6+ messages in thread
From: Jay F. Shachter @ 2002-12-04 19:21 UTC (permalink / raw)
jpw@shootybangbang.com (John Paul Wallington) wrote in message news:<8765ub84i6.fsf@bundalo.shootybangbang.com>...
>
> Perhaps it is related to the value of `scalable-fonts-allowed', which
> is nil by default.
>
This hypothesis may be true, but it is difficult to test.
The problem persisted after I put "(setq scalable-fonts-allowed t)" at the
top of my .emacs file, presumably because emacs crashes and burns before it
even reads the initialization file.
Is there another way of testing the above hypothesis, short of rebuilding
emacs with the above setq statement in lisp/site-init.el?
Jay F. Shachter
jay@m5.chi.il.us
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters
2002-12-04 19:21 ` Jay F. Shachter
@ 2002-12-05 13:43 ` John Paul Wallington
0 siblings, 0 replies; 6+ messages in thread
From: John Paul Wallington @ 2002-12-05 13:43 UTC (permalink / raw)
Jay F. Shachter wrote:
> The problem persisted after I put "(setq scalable-fonts-allowed t)"
> at the top of my .emacs file, presumably because emacs crashes and
> burns before it even reads the initialization file.
>
> Is there another way of testing the above hypothesis, short of
> rebuilding emacs with the above setq statement in
> lisp/site-init.el?
Eek, dunno. If Emacs crashes and burns, please report it as a bug;
perhaps an expert can tell you how to use your fonts.
--
John Paul Wallington
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters
2002-12-03 15:14 Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters Jay F. Shachter
2002-12-03 16:13 ` John Paul Wallington
@ 2002-12-05 16:16 ` Michael Hudson
2003-01-01 1:57 ` David Combs
2 siblings, 0 replies; 6+ messages in thread
From: Michael Hudson @ 2002-12-05 16:16 UTC (permalink / raw)
jay@m5.chi.il.us (Jay F. Shachter) writes:
> 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.
I would not have said the second half of your sentence implies the
first -- I'm sure there are things you can put in .emacs that xemacs
works fine with, but causes unexpected behaviour in GNU emacs, and
vice versa.
Cheers,
M.
--
I wouldn't trust the Anglo-Saxons for much anything else. Given
they way English is spelled, who could trust them on _anything_ that
had to do with writing things down, anyway?
-- Erik Naggum, comp.lang.lisp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters
2002-12-03 15:14 Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters Jay F. Shachter
2002-12-03 16:13 ` John Paul Wallington
2002-12-05 16:16 ` Michael Hudson
@ 2003-01-01 1:57 ` David Combs
2 siblings, 0 replies; 6+ messages in thread
From: David Combs @ 2003-01-01 1:57 UTC (permalink / raw)
In article <6525a5d7.0212030714.47277179@posting.google.com>,
Jay F. Shachter <jay@m5.chi.il.us> wrote:
>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.
>
<BIG SNIP>
I've read the thread, and the suggestion that you
consult with some font "expert".
Please followup here with what suggestions and explanations
you got from those "experts", and what you finally decided to
do.
And, if that program you wrote is still necessary after
all that, perhaps you could post it here too?
Thanks!
David
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-01-01 1:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-03 15:14 Answer to the "Café Américain" problem: diplaying latin-1 hyperascii characters Jay F. Shachter
2002-12-03 16:13 ` 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).