Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: cpu98 on December 07, 2009, 07:23:37 AM

Title: [FIXED] Load complete font, not cached partial glyph.
Post by: cpu98 on December 07, 2009, 07:23:37 AM
Rb doesn't load font entirely. (Absolutely no problem with latin characters)

What I saw is when some glyph is needed to be displayed, rb loads that glyph on the fly (for first time) and save 'which character it was' to font cache (.glyphcache), so rb can load those glyphs on next boot.
I use fat multilingual font and increased MAX_FONT_SIZE to 600K because on default 60K, it fills instantly on first file browsing, so when it needs to display uncached(not cached because font buffer already hit MAX_FONT_SIZE) glyphs, extra loading from the disk happen every next time.

1st problem, If font size(fnt file) is smaller than MAX_FONT_SIZE, all glyphs are messed up.
2nd, loading large font(I tested 400KB, 2800KB) on booting causes heavy seeking, and needs 60+secs. (I think it is because rb doesn't load font continuously (1st glyph, 2nd, 3rd, 4th, 5th...) but load cached glyph discretely like 2nd, 4th, 15th....

So I think an option to completely load fonts would be nice,
and font smaller than MAX_FONT_SIZE should be handled correctly.

edit: clarified
edit: again
edit: FS#11168.
Title: Re: [IDEA] Load complete font, not cached partial glyph.
Post by: Llorean on December 07, 2009, 01:44:38 PM
These both sound like bugs (especially #1). Have you filed but reports for each of them?
Title: Re: [IDEA] Load complete font, not cached partial glyph.
Post by: cpu98 on December 07, 2009, 02:05:31 PM
I'll make them clear and file them if they're valid.
Title: Re: [IDEA] Load complete font, not cached partial glyph.
Post by: JdGordon on December 07, 2009, 02:26:02 PM
the 2 issues there sem like real bugs..
As for loading the full font, you dont want to do that. unifont is 2MB or so IIRC, and of that each person might only need a hundred or so glyphs. allocating enough space for the full font is just a massive waste.
Title: Re: [IDEA] Load complete font, not cached partial glyph.
Post by: cpu98 on December 11, 2009, 04:36:18 PM
I filed them.
Default charset takes: 15s(Init to Main menu)
Default 60KB buffer completly filled (about 350 glyphs): 53s
400KB buffer almost full: 80s

http://www.rockbox.org/tracker/task/10844
http://www.rockbox.org/tracker/task/10845