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

Re: Line wrapping with proportional fonts



on Thu Mar 15 2012, Katsumi Yamaoka <yamaoka-AT-jpl.org> wrote:

> 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))

Yes, I understand... my point was that, as a workaround, it would be
very nice if emacs-w3m would let me "artificially" narrow w3m's idea of
the rendering width... which I see is provided by w3m-fill-column.  So
I'm satisfied for now, thanks!

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com