emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#22323: closed (Font fallback causes inconsistent s


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#22323: closed (Font fallback causes inconsistent stacking of faces in overlays with invisible property)
Date: Fri, 08 Jan 2016 10:24:02 +0000

Your message dated Fri, 08 Jan 2016 12:22:52 +0200
with message-id <address@hidden>
and subject line Re: bug#22323: Font fallback causes inconsistent stacking of 
faces in overlays with invisible property
has caused the debbugs.gnu.org bug report #22323,
regarding Font fallback causes inconsistent stacking of faces in overlays with 
invisible property
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
22323: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22323
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Font fallback causes inconsistent stacking of faces in overlays with invisible property Date: Thu, 7 Jan 2016 11:52:55 -0500 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
Hi all,

Font fallback seems to break face stacking for invisible overlays:

This works fine:

(with-current-buffer (get-buffer-create "No prettification: ellispis is 
highlighed")
  (erase-buffer)
  (fundamental-mode)
  (add-to-invisibility-spec '(outline . t))
  (insert "abc!!def!!ghi")
  (let ((ov (make-overlay 6 9)))
    (overlay-put ov 'invisible 'outline))
  (let ((ov (make-overlay (point-min) (point-max))))
    (overlay-put ov 'face 'region))
  (pop-to-buffer (current-buffer)))

This doesn't work (assuming that ℙ is not in your usual font):

(with-current-buffer (get-buffer-create "No prettification: ellispis is 
highlighed")
  (erase-buffer)
  (fundamental-mode)
  (add-to-invisibility-spec '(outline . t))
  (insert "abcℙℙdefℙℙghi")
  (let ((ov (make-overlay 6 9)))
    (overlay-put ov 'invisible 'outline))
  (let ((ov (make-overlay (point-min) (point-max))))
    (overlay-put ov 'face 'region))
  (pop-to-buffer (current-buffer)))

I came across this while using prettify-symbols-mode:

(with-current-buffer (get-buffer-create "With prettification to common 
character: ellispis is highlighed")
  (erase-buffer)
  (fundamental-mode)
  (add-to-invisibility-spec '(outline . t))
  (insert "abc!!def!!ghi")
  (setq prettify-symbols-alist '(("!!" . ?ℙ)))
  (prettify-symbols-mode)
  (let ((ov (make-overlay 6 9)))
    (overlay-put ov 'invisible 'outline))
  (let ((ov (make-overlay (point-min) (point-max))))
    (overlay-put ov 'face 'region))
  (pop-to-buffer (current-buffer)))

Cheers,
Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#22323: Font fallback causes inconsistent stacking of faces in overlays with invisible property Date: Fri, 08 Jan 2016 12:22:52 +0200
> Cc: address@hidden
> From: Clément Pit--Claudel <address@hidden>
> Date: Thu, 7 Jan 2016 20:19:25 -0500
> 
> > Here's a suggestion: ignore the face of the invisible text altogether,
> > and instead always use the face of the last visible character.  The
> > patch to do that is below; it fixes all of your test cases.  But since
> > you would like to see the face of the invisible text show through, I'm
> > not sure you will like it...
> > 
> > WDYT?
> 
> I like it :) I find it much more consistent that what we currently have. Plus,
> has a desirable property that you pointed out and that I agree with, that the
> properties of the invisible text do not affect the display of the ellipsis. 
> The
> current implementation doesn't have that property (adding a face to a hidden
> character will cause the ellipsis to change to the default face), so I think
> it's a net gain.

Thanks, I pushed it, and I'm marking these 2 bugs as done.

> (In fact, I'm even a bit surprised that it handles the selection and font
> fallback cases properly. It's great that it does though; but did I apply the
> patch incorrectly?)

Yes, you applied correctly.  The default ellipsis uses ASCII
characters, so I think the fallback font doesn't affect them.


--- End Message ---

reply via email to

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