[Top][All Lists]

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

bug#25824: 25.1; bugs about display specfications

From: Eli Zaretskii
Subject: bug#25824: 25.1; bugs about display specfications
Date: Fri, 24 Feb 2017 10:23:13 +0200

> From: address@hidden
> Cc: address@hidden
> Date: Fri, 24 Feb 2017 15:01:19 +0900
> Eli Zaretskii <address@hidden> 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

> > 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.

reply via email to

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