all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joe Wells <jbw@macs.hw.ac.uk>
To: bug-gnu-emacs@gnu.org
Subject: need for font family/registry fallback when size horribly wrong
Date: Thu, 19 Jul 2007 17:24:27 +0100	[thread overview]
Message-ID: <86hco0uzt0.fsf@macs.hw.ac.uk> (raw)

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

                 reply	other threads:[~2007-07-19 16:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=86hco0uzt0.fsf@macs.hw.ac.uk \
    --to=jbw@macs.hw.ac.uk \
    --cc=bug-gnu-emacs@gnu.org \
    /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.