[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need for font family/registry fallback when size horribly wrong

From: Joe Wells
Subject: need for font family/registry fallback when size horribly wrong
Date: Thu, 19 Jul 2007 17:24:27 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

I'm using Emacs 22.1.

Under Ubuntu 6.06 (“Dapper Drake”), the xfonts-base package includes
only one font with family “fixed” and registry “iso8859-5” (Cyrillic).
The font in question is
“/usr/share/X11/fonts/misc/4x6-ISO8859-5.pcf.gz” and has the XLFD name
of “-misc-fixed-medium-r-normal--6-60-75-75-c-40-iso8859-5”.  This
font is extremely small and nearly unreadable.

Emacs will use this font for characters in the cyrillic-iso8859-5
charset, even though this font is horribly unreadable.  For example, I
can do (insert 3695) to get “я” in the cyrillic-iso8859-5 charset and
it will be tiny.  (This e-mail of course uses the utf-8 character set,
so you are unlikely to see any problem with the “я” in the previous
sentence.)  It would be better to fall back to another family.

If I remove the listing for 4x6-ISO8859-5.pcf.gz from the file
“/usr/share/X11/fonts/misc/fonts.dir”, Emacs sensibly falls back to
using another font.  For example, I just tested and it happened to use
console-medium-r-semicondensed--13-125-75-75-c-78-iso8859-5” to
display character 3695.

Unfortunately, there seems to be no way to get Emacs to fall back to a
sensible font if one font exists with the correct family and registry.
The code in best_matching_font seems like it would do the right thing,
but it is called with a list of fonts produced by try_font_list which
will only consider alternate families if no fonts are found in the
requested family.

Is there any way to get Emacs to automatically consider fonts of
alternate families when the size of fonts in the requested family are
horribly far off?

Or is it possible to get Emacs to use fonts with registry iso10646-1
to display Emacs charsets like cyrillic-iso8859-5?  (I'm know about
unify-8859-on-decoding-mode and I'm not asking about that here.)

I would like to avoid mutilating /usr/share/X11/fonts/misc/fonts.dir
to get reasonable behavior from Emacs, because there may be valid uses
for the small fonts (and there are programs using fonts other than

I would also prefer not to use set-fontset-font to fix the chosen
fonts by hand, or to specify my own settings for fontset-standard and

By the way, for technical reasons (I still need to use some files
encoded with ISO 2022), I don't want to turn on
unify-8859-on-decoding-mode, so I want to get a solution that works
for all Emacs charsets.  (I suppose I could use
unify-8859-on-decoding-mode if Emacs were fixed so that it could
encode into iso-latin-1-with-esc from mule-unicode-0100-24ff.  Or
maybe there is a good way to avoid unify-8859-on-decoding-mode for
specific files?)

Thanks for any help you can provide!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]