bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25824: 25.1; bugs about display specfications


From: ynyaaa
Subject: bug#25824: 25.1; bugs about display specfications
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.

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

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

For example in my environment, the form below displays 9 lines.
(insert (propertize "1\n2\n3\n4\n5\n6\n7\n8\n9\n"
        'display '(height 5)))

And the form below displays 7 lines.
(insert (propertize "1\n2\n3\n4\n5\n6\n7\n8\n9\n"
        'display '((raise -1.3) (height 5))))





reply via email to

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