Rockbox

Tasklist

FS#11576 - Clip+ r27911 - Loading 35-Adobe-Helvetica.fnt takes 50k of skin RAM

Attached to Project: Rockbox
Opened by dave t (sockbox) - Sunday, 29 August 2010, 09:27 GMT
Last edited by Fred Bauer (freddyb) - Thursday, 09 September 2010, 18:36 GMT
Task Type Bugs
Category Themes
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Loading either 35 point fonts, 35-Adobe-Helvetica.fnt and 35-Adobe-Helvetica-Bold.fnt, take up 50KB of skin RAM rather than the usual 3KB. This occurs with the latest build for the Sansa Clip+, r27911-100828.

I have attached a test WPS file and a screen shot of the skin ram usage.
This task depends upon

Closed by  Fred Bauer (freddyb)
Thursday, 09 September 2010, 18:36 GMT
Reason for closing:  Not a Bug
Additional comments about closing:  Problem resolved by using new skin fonts "glyphs" option.
Comment by Jonathan Gordon (jdgordon) - Friday, 03 September 2010, 00:39 GMT
a change went in during the last week or so which adds a 3rd optional param to the %Fl() tag to say how many glyphs should be cached, if you leave it off it will default to 256 which means about 50KB for the 35pt fonts.
Comment by dave t (sockbox) - Friday, 03 September 2010, 07:37 GMT
Thanks. The glyph option is great! Reduced my skin by half.
Comment by Fred Bauer (freddyb) - Friday, 03 September 2010, 15:16 GMT
Jd: I thought about capping the default font size to SKIN_FONT_SIZE but I think this will cause problems. The memory required for a font is related to the size of the glyphs and how many glyphs are used rather than screen size. The example above would have only allocated room for 16 glyphs using SKIN_FONT_SIZE. If the WPS displayed a line with 17 unique characters the glyph cache would pull every single glyph from disk. Even on an SD disk target this would be unusable. If the target has a bigger screen SKIN_FONT_SIZE increases to 10240 but that's still only 52 glyphs for a big 35px font, which would still wear out the glyph cache. If anti-aliased fonts get accepted the font glyphs would be 4x larger, compounding the problem.

Loading...