dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: Text viewer with word wrap and scrollbar

Re: Text viewer with word wrap and scrollbar

From: Jean Boullier <>
Date: Thu, 22 May 2003 06:05:25 +0200

Garrett Derner wrote:

>The Archos firmware also limits long lines to 114, probably for a similar
>reason why I do: we have a very small memory buffer. With such long lines,
>the viewer could not fit everything to display in RAM at once. It might
>have to read from the hard disk several times for every screen. That might
>use up battery power a little faster. Just the same, I am sure it can be
>done. Could be somewhat complicated; I'll see.
I have fed the current rockbox text viewer with long lines (a repetition
of the 5 longest lines of my help file) and with very long lines (all
500-char long) to see how it deals with them. The choice the dveloper
has done is to read as many >complete< lines as can fit in the available
buffer (1k apparently, I do not know if it is a hardware constraint or a
choice). The result is that it displays 6 long lines only instead of the
8 lines available with my favorite atadore font. And with the very long
500-char lines it is only 2 lines per screen. I have not (yet) been
naughty enough to try lines longer than 1000 chars so I do not know what
happens then... 8-)

Personally, knowing that the Jukebox is a small machine and not a normal
PC, I find this choice acceptable for a by-line mode and I consider it
as a good compromise when one wants to strictly match lines of the file
with lines of the screen. The only thing which should be fixed is to
adjust the page-scroll size with the actual number of displayed lines
instead of keeping the physical number of lines of the screen as the
standard rockbox does at present.

So, if you find this behaviour acceptable and if you adopt it for your
wide view mode I will be perfectly happy. Otherwise I might ask you if
you can add it as a 3rd option (e.g. "very wide", or "one-for-one") in
your F3 switch ?

By the way, in Archos mode, you already do better than them (again) : my
very long lines are all capitals or figures and a screen can display
only 110 chars of them; and when they go to the next screen they have
forgotten the 4 extra chars that they expected to show on the previous
screen!... You don't.

Cheers and good luck. Jean B.
Received on 2003-05-22

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy