From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: 40687@debbugs.gnu.org
Subject: bug#40687: Missing right border on composed text used in 'display property
Date: Thu, 23 Apr 2020 18:48:09 +0300 [thread overview]
Message-ID: <83d07ycifa.fsf@gnu.org> (raw)
In-Reply-To: <25b96bf7-a166-9d82-351d-1cfea7cec4f2@gmail.com> (message from Clément Pit-Claudel on Fri, 17 Apr 2020 15:44:36 -0400)
> From: Clément Pit-Claudel <cpitclaudel@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)))
next prev parent reply other threads:[~2020-04-23 15:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-17 19:44 bug#40687: Missing right border on composed text used in 'display property Clément Pit-Claudel
2020-04-17 20:33 ` Stephen Berman
2020-04-17 21:11 ` Clément Pit-Claudel
2020-04-23 15:49 ` Eli Zaretskii
2020-04-23 15:48 ` Eli Zaretskii [this message]
2020-04-23 20:07 ` Stephen Berman
2020-04-23 20:25 ` Clément Pit-Claudel
2020-04-24 6:43 ` Eli Zaretskii
2020-04-24 6:33 ` Eli Zaretskii
2020-04-24 12:10 ` Robert Pluim
2020-04-24 12:26 ` Eli Zaretskii
2020-04-24 14:01 ` Clément Pit-Claudel
2020-04-24 14:06 ` Eli Zaretskii
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=83d07ycifa.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=40687@debbugs.gnu.org \
--cc=cpitclaudel@gmail.com \
/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).