This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#12237 - WPS/FMS string space bug introduced by r30302
Attached to Project:
Rockbox
Opened by Glued (glued) - Saturday, 20 August 2011, 15:36 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 14 December 2011, 10:50 GMT+2
Opened by Glued (glued) - Saturday, 20 August 2011, 15:36 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Wednesday, 14 December 2011, 10:50 GMT+2
|
DetailsAn extra space seems to be added to strings, which makes %ac & %ar to render at incorrect positions. At the attached screenshot a 35pt font was used to demonstrate it more clearly.
|
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Wednesday, 14 December 2011, 10:50 GMT+2
Reason for closing: Fixed
Additional comments about closing: r31246
Wednesday, 14 December 2011, 10:50 GMT+2
Reason for closing: Fixed
Additional comments about closing: r31246
I don't get why the latter uses the space char width to calculate the x offset. Same with the space_width var in skin_display.c, to be honest.
Is it from the old fixed-width-only days? There must be a less square way to calculate the x pos.
There are a few ways to possibly fix this, the best would be cleaning up the puts() API so there is a pixel based putsxy which allows us to set a style, otherwise possibly anotherfunction to just set the draw style.. dunno.
Tried various stuff to be sure, all ok.
on rolo, I see some extraneous characters. It looks like this: ( s/-/ / )
ROLO...
Loading
-----------------------ocessor...
The "o" is not complete, but is cut-off - only the right half of the character is displayed. The cut-off "o" appears to start at approximately mid-screen.
In firmware/rolo.c - line 259 "Waiting for coprocessor..." is written to the screen. Line 264 writes an equal number of space characters to the same line to clear what was written. Apparently, this will no longer work if the space character is not the same width as the text characters.
Maybe switch there to "M" / clear full line and commit this?
The patch not only fixes a bug, but brings sanity to lcd.
I'm afraid nobody will submit the rolo patch after that :) because such a tiny addition to your work looks pity.
I mean we all have some skill to replace " " with "M". Some (maybe) can even just clear it up. But the history should remember you alone.
And if you spend just 19 seconds more, it will.
Fame, money, easy chicks -- I don't understand how all that can't motivate you.
fixing rolo wont be an issue but even with that done this isnt quite finished so not commitable yet
Now it's a weird situation:
1) you've fixed the bug, a rather noticeable one for themes with centered 14+ pt font.
2) you've made the api much more sane. not 100%, but dear god, it at least makes sense now.
3) yet some parts will benefit from more cleanup.
To me it looks like this work is worth to be committed with a comment that it needs more cleanup.
If you don't commit it, a dev with both the skill and interest might simply never come, and the bug will live on.
I honestly tried cleaning the api before you, and I couldn't do even the half of your work.
Not to mention your moral obligations to people of earth -- while r30302 didn't create the bug, it did revealed it. Would be a nice manner to kill it...
You said you can't work if uninterested. Well, don't anymore. Your patch doesn't solve world hunger, it fixes a bug.
Please click on the screenshot again. If you think this is how Rockbox should look like, don't commit your work, ok.
In case it's useful for debugging, I've attached it here.
BTW, is this down as a bug that needs fixing before 3.10 is released? If not, I think it's enough of a regression to deserve it.