unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* need for font family/registry fallback when size horribly wrong
@ 2007-07-19 16:24 Joe Wells
  0 siblings, 0 replies; only message in thread
From: Joe Wells @ 2007-07-19 16:24 UTC (permalink / raw)
  To: bug-gnu-emacs

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
“-b&h-lucida
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
Emacs).

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
fontset-startup.

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!

-- 
Joe

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-19 16:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19 16:24 need for font family/registry fallback when size horribly wrong Joe Wells

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).