unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: font selection confusion
Date: Thu, 05 Mar 2009 21:53:43 +0900	[thread overview]
Message-ID: <E1LfD55-000519-2S@etlken> (raw)
In-Reply-To: <buo63ip985x.fsf@dhlpc061.dev.necel.com> (message from Miles Bader on Wed, 04 Mar 2009 14:19:38 +0900)

In article <buo63ip985x.fsf@dhlpc061.dev.necel.com>, Miles Bader <miles.bader@necel.com> writes:

>   (1) Start "HOME=/tmp emacs -Q"

>   (2) Insert this string in *scratch*:  ❦⋮
>       (those two characters are \u2766, "FLORAL HEART", and \u22ee,
>       "VERTICAL ELLIPSIS")

>   (3) On my system, which is debian unstable, the default font used is
>       "Dejuavu Sans Mono"; using that font, the "FLORAL HEART" can be
>       displayed using the default font, and "VERTICAL ELLIPSIS" is
>       displayed using a different font,
>       "-mutt-clearlyu-medium-r-normal--17-120-100-100-p-123-iso10646-1"

>   (4) Now, I use the "Options > Set Default Font" menu to change the
>       default font to "Liberation Mono" (this is a commonly installed
>       free font, but any font with poor coverage of funny characters
>       will seems to give the same result...).

>   (5) Liberation Mono does not have either of those characters, but what
>       happens is:  the "FLORAL HEART" character is now displayed as an
>       empty box, but the "VERTICAL ELLIPSIS" character continues to be
>       displayed using the "mutt-clearlyu" font.

This is because Emacs avoid greedy search of a font for each
entry of a fontset.  As those characters are both `symbol'
script, Emacs tries to find a font that has one of #x201C,
#x2200, or #x2500.  If a font is found, that font is used
for all symbol characters.  But some of found font may not
have a specific symbol character (e.g U+2766).  In such a
case, that character is shown by an empty box.

This is to avoid extreme slowness on displaying a buffer
that contains many characters for which you don't have any
font.

But, I've just installed a code that does a little bit more
greedy search.  It should works for such a font backend that
supports `has_char' method for a font-entity, e.g. xft.

---
Kenichi Handa
handa@m17n.org




  parent reply	other threads:[~2009-03-05 12:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-04  5:19 font selection confusion Miles Bader
2009-03-04  8:41 ` Stephen Berman
2009-03-19 11:37   ` Kenichi Handa
2009-03-19 11:47     ` Stephen Berman
2009-03-19 11:51       ` Kenichi Handa
2009-03-05 12:53 ` Kenichi Handa [this message]
2009-03-05 14:53   ` Miles Bader

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1LfD55-000519-2S@etlken \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    --cc=miles@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 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).