[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Horizontal centering in the display engine
From: |
sbaugh |
Subject: |
Re: Horizontal centering in the display engine |
Date: |
Tue, 13 Apr 2021 15:28:06 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> The display engine supports display text left-aligned and right-aligned.
> What do you mean by "right-aligned"? can you give an example of such
> an alignment?
Ah, I was just vaguely gesturing at RTL support in Emacs. It's not
really relevant to what I was asking. But that's moot, because...
>> far as I can tell, it doesn't support displaying text centered.
>
> Doesn't :align-to display spec allow to solve this problem? Or maybe
> I don't understand the use case well enough?
...this seems like exactly what I'm looking for! But, I don't think the
possible "pixel specifications" can support exactly the kind of
centering I want.
To have centered text, I think I'd want to do something like
:align-to (- center (0.5 . line-size))
Where line-size is the is the width in pixels of the specific line that
is being aligned.
This would put the center of the line of text in the center of the
window, and automatically recalculate that each time the line or window
changes size.
As far as I understand the documentation, there's no way to express
something like line-size currently? Maybe that could be easily added?
Thanks!
- Horizontal centering in the display engine, sbaugh, 2021/04/13
- Re: Horizontal centering in the display engine, Eli Zaretskii, 2021/04/13
- Re: Horizontal centering in the display engine,
sbaugh <=
- Re: Horizontal centering in the display engine, Eli Zaretskii, 2021/04/13
- Re: Horizontal centering in the display engine, sbaugh, 2021/04/13
- Re: Horizontal centering in the display engine, Eli Zaretskii, 2021/04/14
- Re: Horizontal centering in the display engine, sbaugh, 2021/04/14
- Re: Horizontal centering in the display engine, Yuan Fu, 2021/04/14
- Re: Horizontal centering in the display engine, Stefan Monnier, 2021/04/14
- Re: Horizontal centering in the display engine, sbaugh, 2021/04/14
- Re: Horizontal centering in the display engine, Eli Zaretskii, 2021/04/14
- Re: Horizontal centering in the display engine, sbaugh, 2021/04/14
- Re: Horizontal centering in the display engine, Eli Zaretskii, 2021/04/14