From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Enclosing text in a box
Date: Wed, 16 Nov 2022 22:00:51 +0200 [thread overview]
Message-ID: <8335aifz4c.fsf@gnu.org> (raw)
In-Reply-To: <TjxpVWaoHgIxShYMLtet9PZtZOfa-qso9ZQ7Q7tNVZis9AwNQrl9TgainvSW7Rja9zMnNLi7T1iTDctSKvA0mV9jbnu_M1vjPn-_Ab4CgME=@protonmail.com> (message from Heime on Wed, 16 Nov 2022 19:35:17 +0000)
> 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.
next prev parent reply other threads:[~2022-11-16 20:00 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 12:47 Enclosing text in a box Heime
2022-11-16 13:07 ` Heime
2022-11-16 13:34 ` Alexis Roda
2022-11-16 13:58 ` Eli Zaretskii
2022-11-16 14:11 ` Yuri Khan
2022-11-16 14:20 ` Heime
2022-11-16 14:47 ` Eli Zaretskii
2022-11-16 14:51 ` Heime
2022-11-16 14:55 ` Emanuel Berg
2022-11-16 20:56 ` Emanuel Berg
2022-11-16 16:44 ` Eli Zaretskii
2022-11-16 16:48 ` Heime
2022-11-16 16:53 ` Heime
2022-11-16 19:20 ` Eli Zaretskii
2022-11-16 19:35 ` Heime
2022-11-16 19:42 ` Emanuel Berg
2022-11-16 21:01 ` Heime
2022-11-16 20:00 ` Eli Zaretskii [this message]
2022-11-16 20:55 ` Emanuel Berg
2022-11-18 14:48 ` Eli Zaretskii
2022-11-18 15:10 ` tomas
2022-11-18 19:18 ` Emanuel Berg
2022-11-16 21:04 ` Emanuel Berg
2022-11-16 14:55 ` Yuri Khan
2022-11-16 15:06 ` Yuri Khan
2022-11-16 16:12 ` tomas
2022-11-16 16:43 ` Heime
2022-11-17 6:43 ` Jean Louis
2022-11-17 6:57 ` Emanuel Berg
2022-11-18 19:11 ` Jean Louis
2022-11-21 12:53 ` Emanuel Berg
2022-11-18 16:20 ` [External] : " Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8335aifz4c.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).