From: ynyaaa@gmail.com
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25824@debbugs.gnu.org
Subject: bug#25824: 25.1; bugs about display specfications
Date: Thu, 23 Feb 2017 11:53:16 +0900 [thread overview]
Message-ID: <87y3wxfwir.fsf@gmail.com> (raw)
In-Reply-To: <87poicrxc9.fsf@gmail.com>
Eli Zaretskii <eliz@gnu.org> writes:
> Display
> string and 'raise'/'heaight' specs don't make sense together in the
> same display spec.
The height of the replacing text can be controlled by its face.
Is there any chance to 'raise' the replacing text?
> The space is needed to accommodate the enlarged X on the same screen
> line. Emacs display engine doesn't require that all the glyphs on a
> line be of the same size, but it does require them to have the same
> baseline (the display geometry is that of a canvas).
I don't understand the relation between the space and the baseline.
I want to display large text centered vertically.
But there is a blank area over the large text.
I expect line-pixel-height of a line with 5 times larger text
is 5 times larger than a normal line.
Practically, if the large text is 'raise'd negative,
line-pixel-height is 5 times plus 'raise'd pixels larger.
(with some computational error)
;; normal line
(line-pixel-height)
=>22
;; large text without raise specification
(progn
(insert "normal"
(propertize "LARGE" 'display '((height 5))))
(beginning-of-line)
(line-pixel-height))
=>107
;; cap height is 14 and line height is 22
;; 'raise' -2 * cap height pixels
(progn
(insert "normal"
(propertize "LARGE" 'display '((raise -1.2727) (height 5))))
(beginning-of-line)
(line-pixel-height))
=>134
By the way, if the baseline height is same,
I think consecutive underlines should be displayed as one straight line.
The form below shows three underlines with different height.
(insert (propertize "X" 'face '(:underline t))
(propertize "X" 'face '(:underline t) 'display '((raise -1)))
(propertize "X" 'face '(:underline t) 'display '((raise 1))))
As for overlines, they are displayed as one straight line.
(insert (propertize "X" 'face '(:overline t))
(propertize "X" 'face '(:overline t) 'display '((raise -1)))
(propertize "X" 'face '(:overline t) 'display '((raise 1))))
next prev parent reply other threads:[~2017-02-23 2:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-21 4:17 bug#25824: 25.1; bugs about display specfications ynyaaa
2017-02-21 17:37 ` Eli Zaretskii
2017-02-23 2:53 ` ynyaaa [this message]
2017-02-23 15:51 ` Eli Zaretskii
2017-02-24 6:01 ` ynyaaa
2017-02-24 8:23 ` Eli Zaretskii
2017-03-04 16:00 ` 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=87y3wxfwir.fsf@gmail.com \
--to=ynyaaa@gmail.com \
--cc=25824@debbugs.gnu.org \
--cc=eliz@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).