[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Enclosing text in a box
From: |
Eli Zaretskii |
Subject: |
Re: Enclosing text in a box |
Date: |
Wed, 16 Nov 2022 22:00:51 +0200 |
> Date: Wed, 16 Nov 2022 19:35:17 +0000
> From: Heime <heimeborgia@protonmail.com>
> Cc: help-gnu-emacs@gnu.org
>
> > Any character can pose such problems. It depends on the font you are
> > using.
>
> So what are people to do?
I already advised what to do, in my original message in this thread.
> Basically it means that we cannot rely on "length" and
> "string-width".
No, it means don't use 'length' (because its purpose is not to measure
the display width). You _can_ use 'string-width', it will do a good
job in almost all cases. If you need 110% solution, use
'string-pixel-width'.
> Then the function are there for nothing.
How do you get to such extreme conclusions without even trying what
you were advised to do?
> Asking users to handle such conditions would be too hard to do
> repeatedly.
This is not userland, this is Emacs Lisp programming for display, and
yes, it is quite tricky if you want rock-solid solutions that work
with arbitrary characters and fonts.
- Re: Enclosing text in a box, (continued)
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box, Yuri Khan, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box,
Eli Zaretskii <=
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/18
- Re: Enclosing text in a box, Eli Zaretskii, 2022/11/18
- Re: Enclosing text in a box, tomas, 2022/11/18
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/20
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/18
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/16
- Re: Enclosing text in a box, Heime, 2022/11/16
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/16
- Re: Enclosing text in a box, Emanuel Berg, 2022/11/18
- Re: Enclosing text in a box, Yuri Khan, 2022/11/16