[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Horizontal centering in the display engine
From: |
Eli Zaretskii |
Subject: |
Re: Horizontal centering in the display engine |
Date: |
Tue, 13 Apr 2021 22:43:29 +0300 |
> From: sbaugh@catern.com
> Date: Tue, 13 Apr 2021 15:28:06 -0400
>
> > 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?
We have window-text-pixel-size, isn't that what you want?
If that doesn't help, then I guess I'll ask you to describe the use
case in more detail. E.g., are you planning on centering each line
separately, or everything together, or something else? IOW, how did
you envision you'd put the display property on each line? and how does
this work when the user types text to add more lines, or make a line
longer than the window? etc. etc.
- 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, 2021/04/13
- Re: Horizontal centering in the display engine,
Eli Zaretskii <=
- 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
- Re: Horizontal centering in the display engine, martin rudalics, 2021/04/14