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

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



reply via email to

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