unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: handa@gnu.org (K. Handa)
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 17973@debbugs.gnu.org
Subject: bug#17973: Thin space not thin at all
Date: Thu, 10 Jul 2014 00:32:33 +0900	[thread overview]
Message-ID: <87d2deeeem.fsf@gnu.org> (raw)
In-Reply-To: <jwv1ttvpvuu.fsf@iro.umontreal.ca> (message from Stefan Monnier on Tue, 08 Jul 2014 14:07:53 -0400)

In article <jwv1ttvpvuu.fsf@iro.umontreal.ca>, Stefan Monnier <monnier@iro.umontreal.ca> writes:

>    % emacs-24/src/emacs -Q -fn '-misc-fixed-*-r-semicondensed--13-*-*-*-*-*-*'
>    M-< C-f C-x SPC

> At this point I should see a thin space before the cursor (highlighted
> with the region face).  Instead I see a full space.

>    C-u C-x =

> indeed shows that there's an overlay at point with an after-string of:

>    #(" " 0 1 (face (region (:height 0.2))))

> Now admittedly, ":height 0.2" does not specify a width, but Emacs should
> be able to find a font that's about 2½ pixels high but not
> 6 pixels wide.

> This is related to bug#16403, in that this is probably a long-standing
> bug, but the new rectangular region makes it more visible.
> Maybe it's actually the same bug as bug#9787 as well, which is also more
> visible since *VC-log* uses such a "thin line" to separate the header
> from the body.

Yes, I agree that they are all the same bug.  As far as I
know, the problem is with the mechanism of face attribute
merging.  When the control reaches the font selection
function font_find_for_lface, font related attributes
(family, foundry, weight, ..., height, ...) are already
merged.  As font_find_for_lface doesn't know which attribute
to respect more (except for what specified in
face-font-selection-order), it at first tries to get a list
of fonts whose family, foundry, registry, adstyle are the
same as merged attributes, and selects a font most close to
the specified height.

To fix this problem, perhaps we must propagate the
information about how font related attributes are merged;
i.e. which one comes from the specific face directly and
which one is inherited from the other faces (including the
default face).  It's not a trivial work.

---
Kenichi Handa
handa@gnu.org





  reply	other threads:[~2014-07-09 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 18:07 bug#17973: Thin space not thin at all Stefan Monnier
2014-07-09 15:32 ` K. Handa [this message]
2014-07-09 19:21   ` Stefan Monnier
2014-07-10 14:28     ` K. Handa
2014-07-10 16:37       ` Stefan Monnier
2014-07-13 15:12         ` K. Handa
2014-07-19  6:13           ` Stefan Monnier
2014-07-19 15:57             ` K. Handa
2014-07-19 17:30               ` Stefan Monnier

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=87d2deeeem.fsf@gnu.org \
    --to=handa@gnu.org \
    --cc=17973@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).