GNU bug report logs - #40687
Missing right border on composed text used in 'display property

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Fri, 17 Apr 2020 19:45:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 40687 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: 40687 <at> debbugs.gnu.org
Subject: Re: bug#40687: Missing right border on composed text used in 'display
 property
Date: Thu, 23 Apr 2020 18:48:09 +0300
> From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
> Date: Fri, 17 Apr 2020 15:44:36 -0400
> 
> With the following sample code, I observe the results shown in the attached image.  The first two "ab" have a border, but the last one only has three-quarters of its border: the right side is missing.
> 
> (defface my-button
>   '((t :box(:line-width -4 :style released-button)
>        :background"lightgrey":foreground"black"))
>   "Button face")
> 
> (with-current-buffer (get-buffer-create "button")
>   (insert "\n")
>   (insert (propertize "ab" 'face 'my-button))
>   (insert " ")
>   (insert (propertize (compose-chars ?a '(Br . Bl) ?b) 'face 'my-button))
>   (insert " ")
>   (insert (propertize "ab" 'display (compose-chars ?a '(Br . Bl) ?b) 'face 'my-button))
>   (insert " ")
>   (pop-to-buffer-same-window (current-buffer)))

Thanks, should be fixed now.

FTR, a recipe to test more fully display of composed text with a :box
face is below.  I found quite a few problems with this, especially
when the text in the boxed face ends with a composed character.  They
should be fixed now on the master branch.  I tested this fully only on
MS-Windows; could someone please use the recipe below to verify the
display looks correctly also on X and on NS?  Note that what appears
below to be LATIN SMALL LETTER A WITH ACUTE is not a single character,
but 2 characters that are composed into a single glyph.

(defface my-button
  '((t :box(:line-width -4 :style released-button)
       :background"lightgrey":foreground"black"))
  "Button face")

(with-current-buffer (get-buffer-create "button")
  (insert "\n")
  (insert " ")
  (insert (propertize "ab" 'face 'my-button))
  (insert " ")
  (insert "\n")
  (insert " ")
  (insert (propertize (compose-chars ?a '(Br . Bl) ?b) 'face 'my-button))
  (insert " ")
  (insert "\n")
  (insert " ")
  (insert (propertize "ab" 'display (compose-chars ?a '(Br . Bl) ?b) 'face 'my-button))
  (insert " ")
  (insert "\n")
  (insert " ")
  (insert (propertize "xá" 'face 'my-button))
  (insert " ")
  (insert "\n")
  (insert " ")
  (insert (propertize "Khmer (ភាសាខ្មែរ) ជំរាបសួរ" 'face 'my-button))
  (insert " ")
  (pop-to-buffer-same-window (current-buffer)))




This bug report was last modified 5 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.