[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Why is emacs so square?"

From: Eli Zaretskii
Subject: Re: "Why is emacs so square?"
Date: Sat, 06 Jun 2020 09:55:25 +0300

> From: Richard Stallman <rms@gnu.org>
> Date: Fri, 05 Jun 2020 23:56:16 -0400
> Cc: sb@dod.no, emacs-devel@gnu.org
>   > * advice insert funcion(s) to check for current line pixel-width and
>   >   pixel-height. If width or height exceed template width and height then
>   >   insert ^L to denote page break and move point to next line and insert
>   >   text in next line. If width is exceeded maybe it is just enough to
>   >   move point to next line, but when height for a page is exceeded one
>   >   would need a special char to visualize page break.
> If this works reliably, and isn't very slow, it could be good enough.
> For this to work reliably requires understanding the width of text
> as it will eventually be rendered, including different sizes and
> variants (italic, bold, etc).

FWIW, I don't think this is possible from Lisp, not with the currently
available facilities.  shr.el does something like that, and it does a
decent job with the tools it has, but IMO it is nowhere near what is
needed, and cannot handle complex situations with various complex
scripts.  It is also quite slow: I sometimes need to wait for several
seconds for it to display an email message of a couple of hundreds

Layout in Emacs has to be done in C to be both efficient and fully
capable.  Some small and simple jobs, like pixel-level alignment, can
be done in Lisp, but not the entire job as a whole.

reply via email to

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