Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search




Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Adjustable font line height?
« previous next »
  • Print
Pages: [1]

Author Topic: Adjustable font line height?  (Read 3182 times)

Offline illux

  • Member
  • *
  • Posts: 7
Adjustable font line height?
« on: June 28, 2010, 04: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?

Logged
Rockin' on iHP-140

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3362
  • creature
Re: Adjustable font line height?
« Reply #1 on: June 28, 2010, 04:14:32 PM »
Quote from: illux on June 28, 2010, 04:02:21 PM
Regarding themeing, can the fonts line height be adjusted like you can in css?

No.

Quote
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.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline JdGordon

  • Global Moderator
  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Adjustable font line height?
« Reply #2 on: June 28, 2010, 07:13:24 PM »
you could easily hack this up yourself, but as bluebrother said, it isnt likely to happen any time soon in svn.
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline illux

  • Member
  • *
  • Posts: 7
Re: Adjustable font line height?
« Reply #3 on: June 28, 2010, 07:31:39 PM »
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.
« Last Edit: June 28, 2010, 07:35:02 PM by illux »
Logged
Rockin' on iHP-140

Offline JdGordon

  • Global Moderator
  • Member
  • *
  • Posts: 1817
  • Constantly breaking stuff
Re: Adjustable font line height?
« Reply #4 on: June 28, 2010, 09:22:45 PM »
.fnt is just a converted .Bdf and it does support non square glyphs. They must all be the same height though
Logged


Using PMs to annoy devs about bugs/patches is not a good way to have the issue looked at.

Offline Yotto

  • Artist
  • Member
  • *
  • Posts: 826
  • Every Silver Lining has a Cloud
    • My Blog
Re: Adjustable font line height?
« Reply #5 on: June 28, 2010, 10:49:55 PM »
They don't even need to all be the same width ("l" can be skinnier than "m", for example)
Logged
Pulp Audio Weekly - Where we talk about News, Reviews, and pretty much anything else we feel like discussing.

Offline fml2

  • Member
  • *
  • Posts: 157
Re: Adjustable font line height?
« Reply #6 on: July 07, 2010, 09:42:58 AM »
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.
Logged

Offline Giova

  • Member
  • *
  • Posts: 25
Re: Adjustable font line height?
« Reply #7 on: July 10, 2010, 01:33:00 AM »
Those are the options:
Code: [Select]
-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:
Code: [Select]
./convbdf -a 80% -d 80% -f 16-Adobe-Helvetica.bdf
This is very usefull for touchscreen devices.
Logged

Offline fml2

  • Member
  • *
  • Posts: 157
Re: Adjustable font line height?
« Reply #8 on: July 20, 2010, 04:54:51 AM »
Quote from: Giova on July 10, 2010, 01:33:00 AM
Use those like this:
Code: [Select]
./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%!".
Logged

Offline chris_s

  • Member
  • *
  • Posts: 81
Re: Adjustable font line height?
« Reply #9 on: December 18, 2018, 11:36:33 AM »
Quote from: illux on June 28, 2010, 07:31:39 PM
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.
« Last Edit: December 18, 2018, 11:43:04 AM by chris_s »
Logged

Offline chris_s

  • Member
  • *
  • Posts: 81
Re: Adjustable font line height?
« Reply #10 on: December 19, 2018, 02:11:22 AM »
Figured out a nice workaround using blank icons... Pretty much achieves the same effect. Awesome!  :D
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Theming and Appearance Customization
| | |-+  Adjustable font line height?
 

  • SMF 2.0.6 | SMF © 2013, Simple Machines
  • XHTML
  • RSS
  • WAP2

Page created in 0.141 seconds with 62 queries.