Welcome to awesome bug tracking system.

FS#948 - 'em' units for sizes

Attached to Project: awesome
Opened by Iaroslav (imposeren) - Monday, 12 December 2011, 10:07 GMT
Task Type Feature Request
Category Widgets
Status Unconfirmed
Assigned To No-one
Operating System Linux
Severity Low
Priority Normal
Reported Version 3.4.11
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 1
Private No


It would be great to have ability setting sizes (widget width for example) in em's.

This would be useful when wibox will honor xft font settings (dpi).
This task depends upon

Comment by Uli Schlachter (psychon) - Monday, 12 December 2011, 15:43 GMT
The problem with this bug and  FS#947  is that I have no clue how this has to be done.

Looking at pango's source code, it looks it assumes 96 dpi unless you tell it otherwise via pango_cairo_font_map_set_resolution() (or pango_cairo_context_set_resolution()).

You mentioned fontconfig in  FS#947 . Awesome does not use fontconfig. It uses pango/cairo instead. No idea how we could get any DPI settings from fontconfig.
You also mentioned the X server resource database. No idea how that should be done either.

I don't really feel like reinventing so many wheels. Why can't pango handle this for us? :-(
Comment by Uli Schlachter (psychon) - Saturday, 03 March 2012, 11:43 GMT
Oh and I just noticed/remembered that different screens can have different number of DPI. Handling that properly would be a nightmare. :-(