Rockbox Technical Forums
Support and General Use => Theming and Appearance Customization => Topic started by: illux on June 28, 2010, 05:02:21 PM
-
Hi I'm new to this forum and new to rockbox
Regarding themeing, can the fonts line height be adjusted like you can in css?
The default font pack is really nice, but its difficult to read menus and text without a 1 or 2 pixel spacing between the lines. Is this possible within the themeing engine? or is this a feature for the rockbox wishlist in future?
-
Regarding themeing, can the fonts line height be adjusted like you can in css?
No.
The default font pack is really nice, but its difficult to read menus and text without a 1 or 2 pixel spacing between the lines.
I disagree with this (it definitely depends on the font itself), but of course that's also a matter of taste :) There was a patch for setting the line heigth in the wps quite a while ago, but that was rejected. Besides, it didn't affect the menus at all.
-
you could easily hack this up yourself, but as bluebrother said, it isnt likely to happen any time soon in svn.
-
Thanks for the quick reply,
Instead of coding or hacking up a config, I was thinking of padding one of the default fonts with extra pixels. For example taking a 10 pixel font and adding a 1px row to the top and 1px row at the base and re-saving it as a 12px font to get a similar effect, Im not sure about how leading (character spacing) works yet.
It looks like the fonts are all square pixels, same width x height. Can the font rendering engine render a non-square bitmap .fnt like 10px by 12px?
Cheers, I'll google the rest & search the forums for .fnt conversions etc.
-
.fnt is just a converted .Bdf and it does support non square glyphs. They must all be the same height though
-
They don't even need to all be the same width ("l" can be skinnier than "m", for example)
-
The convbdf utility (which is used to convert .bdf files to .fnt files, i.e. to font files in rockbox format) has an option that does exactly what you need: change the height of the produced font (its ascent and descent) without changing the original input .bdf. I don't remember what are those options but they should be displayed if you run the utility without any parameters.
-
Those are the options:
-a N[%][!] Allow the ascent to grow N pixels/% to avoid glyph clipping
-d N[%][!] Allow the descent to grow N pixels/% to avoid glyph clipping
Use those like this:
./convbdf -a 80% -d 80% -f 16-Adobe-Helvetica.bdf
This is very usefull for touchscreen devices.
-
Use those like this:
./convbdf -a 80% -d 80% -f 16-Adobe-Helvetica.bdf
I think, this syntax will do nothing if the font is designed properly. To really force the ascent/descent to grow you should add a "!" to the parameter. e.g. "-a 80%!".
-
Im not sure about how leading (character spacing) works yet.
Did you ever find a solution for that? I'm also trying to increase the padding around list items. The aforementioned way of using convbdf certainly works great to increase the vertical padding between list items, but the text still bumps up against the left edge, with no room to breathe.
-
Figured out a nice workaround using blank icons... Pretty much achieves the same effect. Awesome! :D