From: Eli Zaretskii <eliz@gnu.org>
To: ynyaaa@gmail.com
Cc: 25824-done@debbugs.gnu.org
Subject: bug#25824: 25.1; bugs about display specfications
Date: Sat, 04 Mar 2017 18:00:13 +0200 [thread overview]
Message-ID: <83mvd1jalu.fsf@gnu.org> (raw)
In-Reply-To: <83tw7kro9a.fsf@gnu.org> (message from Eli Zaretskii on Fri, 24 Feb 2017 10:23:13 +0200)
> Date: Fri, 24 Feb 2017 10:23:13 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 25824@debbugs.gnu.org
>
> > From: ynyaaa@gmail.com
> > Cc: 25824@debbugs.gnu.org
> > Date: Fri, 24 Feb 2017 15:01:19 +0900
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> > > Only if the replacement comes from a before- or after-string (in which
> > > case the text won't be replaced, so you will have to hide it with some
> > > invisible property). Put the 'raise' display property on the overlay
> > > string, and you will have what you want.
> >
> > Overlays are not editable with kill and yank,
> > so text properties are better.
>
> Then I'm afraid you are out of luck, because Emacs doesn't support
> recursive 'display' properties, i.e. a 'display' property that is a
> string which has another 'display' property for (a part of) that
> string.
>
> > > What the display engine does is reserve space above
> > > the baseline that is large enough for the enlarged font, and then draw
> > > the "X" with a negative offset relative to the baseline, by enlarging
> > > the 'descent' value of that particular glyph, which adds vertical
> > > space _below_ the line.
> >
> > I wonder why the display engine does not take 'rase' into account
> > when reserving space above the baseline.
>
> AFAIU, it's just a side effect of the implementation: 'raise' is
> implemented as modifications of the ascent or descent, so it behaves
> like these attributes of any glyph would.
>
> > > Does the below do what you want? If not, perhaps I don't understand
> > > what you mean by "centered".
> > >
> > > (insert "A" (propertize "X" 'display '((raise -0.2) (height 2))))
> >
> > It is enough for only one line.
> > With blank areas, emacs can display fewer lines.
>
> Yes, there are limitations of what can be done in Emacs as far as text
> layout is concerned.
I've now clarified the relations between 'raise' and 'height' in the
ELisp manual, and I'm closing this bug.
Thanks.
prev parent reply other threads:[~2017-03-04 16:00 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
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 [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mvd1jalu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=25824-done@debbugs.gnu.org \
--cc=ynyaaa@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.