FS#2455 - Fix proportional fonts in text viewer

Attached to Project: Rockbox
Opened by pillo (pillo79) - Saturday, 26 February 2005, 14:14 GMT
Last edited by Linus Nielsen Feltzing (linusnielsen) - Friday, 13 May 2005, 13:33 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


This patch adds proportional font support to the text
viewer plugin. Word wrapping is done w.r.t. pixel width
and not character count.
I have also added another line mode called "reflow",
that tries to fit text in the display with uniform word
spacing and paragraph indentation. Reading books on the
Iriver is much better now ;)
This task depends upon

Closed by  Linus Nielsen Feltzing (linusnielsen)
Friday, 13 May 2005, 13:33 GMT
Reason for closing:  Accepted
Additional comments about closing:  Logged In: YES

Thanks a lot, Luca!
Comment by Jonas Häggqvist (rasher) - Friday, 11 March 2005, 00:27 GMT

I think there's a bug with the reflow mode. Sometimes it
would "spill" a character to the preceeding line for me.

Maybe I'll have a look at the code at some point, but now
you know - you probably have a better chance at fixing this
than me :)
Comment by pillo (pillo79) - Friday, 11 March 2005, 07:38 GMT

You mean fitting a longer string than the maximum width could
allow? Are there any hypens in the line?
Or perhaps you mean placing the first character of a word in a line
and the remaining on the next one?

Could you please submit a text example and specify the font you
used? So I'll be able to fix it. Thanks!
Comment by Anonymous Submitter - Tuesday, 15 March 2005, 13:38 GMT

Can you add a binary .rock for recorder V1? So more people
can test this patch! Thanks!

Comment by Jonas Häggqvist (rasher) - Tuesday, 15 March 2005, 23:37 GMT

Uh.. I'm now unable to reproduce it.. I'll keep trying..
Comment by Jonas Häggqvist (rasher) - Tuesday, 15 March 2005, 23:49 GMT

No, got it.

Font: proportional.fnt
File: .rockbox/DOCS/CUSTOM_WPS_FORMAT.txt
Mode: Join lines/Reflow lines

Result a bit down:
File location ------------- C
Custom WPS files
Comment by pillo (pillo79) - Wednesday, 16 March 2005, 08:11 GMT

Ok thanks, I'll work on that.

PS. I'll try to setup the build environment for Archos;
however, I only own an iRiver, so I can't test my builds on
Recorders and such. Maybe it's better if somebody posts his
compiled version.
Comment by pillo (pillo79) - Wednesday, 23 March 2005, 23:18 GMT

That problem should be fixed now. Let me know if you spot
other quirks.
(No build still for archos, I have to spend some more time
and I can spare really little these days...)
Comment by Linus Nielsen Feltzing (linusnielsen) - Friday, 13 May 2005, 13:33 GMT

Thanks a lot, Luca!