[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Line wrapping with proportional fonts
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Fri, 16 Mar 2012 08:42:29 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 11779
- References: <m2y5r2w0sb.fsf@xxxxxxxxxxxxxxxxxxxxx>
In [emacs-w3m : No.11776] Dave Abrahams wrote:
> When I invoke `M-x variable-pitch-mode' in a w3m buffer, lines commonly
> extend beyond the right side of the window before they wrap. In case
> this is impossible to address correctly and completely due to line wraps
> being calculated on the basis of a fixed character width, it would help
> if we could specify a margin width to be subtracted from the physical
> width when calculating line wraps.
shr.el may have a potential to be able (to be improved) to show
variable pitch text beautifully, because it decodes and renders
html by itself (Lars may not side with, since it is named
*Simple* HTML Renderer, though). Emacs-w3m depends heavily on
decoding and a major part of rendering (including line wrapping)
of w3m, that seems to suppose that a fixed font is used. So, I
think it is hard to make emacs-w3m re-render w3m's output.
This is what emacs-w3m does using w3m:
(with-temp-buffer
(insert "<html>The quick brown fox jumps over the lazy dog.</html>")
(call-process-region (point-min) (point-max) "w3m" t t nil
"-halfdump" "-T" "text/html" "-cols" "20")
(buffer-string))