The issue of DPI

Nuutti Kotivuori naked at iki.fi
Tue Aug 7 23:50:26 CEST 2007


It seems that right now, Xfbdev is started with the *actual* DPI
(285). As a result, "normal" font sizes such as Bitstream Vera Mono 11
are HUGE compared to the display size on Neo1973.

There is a bug open in the bugzilla about this:

http://bugzilla.openmoko.org/cgi-bin/bugzilla//show_bug.cgi?id=59

It seems the approach is to report the actual DPI (285) to the X
server and then adapt the font sizes to suit this.

I am not convinced that this is the right approach - but I'm not too
savvy in this thing so please feel free correct me. I will try to
explain myself a bit.

For applications developed for the device itself, Openmoko apps, the
dpi the server is being reported is pretty much meaningless - the font
sizes in Openmoko apps can be adjusted to be suitable. And more to the
point - since the applications seem to adjust their button sizes and
other layout to the size of the screen, the text sizes should scale
according to the button and window sizes in pixels. If the buttons and
texts are not scaled in sync, we will end up with odd screens where
there are huge buttons and tiny text in the center, or worse yet,
small buttons where the text overflows the button boundaries. But I'm
not sure if this is technically as easy to achieve - so just
hardcoding fontsizes which are in sync with the DPI should be good
enough.

So, if Openmoko apps can be adapted to the DPI, the DPI mostly affects
software that is *not* specifically targeted for the Neo1973. And
there in comes my gripe.

With such a high DPI value just about all software (which are affected
by DPI) become unusable, since the text on the software is way too
large for the screen. If the user interface in the program also adapts
to DPI, that will most likely not fit on the Neo1973 screen
either. This is ofcourse obvious - if I take my 24" monitor and
separate the physical size of the Neo1973 screen from it - nothing at
all will fit there.

This is all because DPI is used (wrongly) to scale fonts to be the
same physical size everywhere - where as the perceived size of the
font changes depending on how far the user is from the display
device. And the Neo1973 is used from a much shorter distance than
normal displays.

So, I would suggest that the DPI value would be picked so that the
perceived size of characters on the Neo1973 screen would be
similar. But even more so, the DPI value should be picked so that it
is a reasonable compromise between text readability and interface size
on *unmodified* 3rd party programs.

I think a good method on finding the "best" DPI value is to think of a
web-browser running on Neo1973. Adjust the DPI so that normal body
text is readable on the Neo1973 and that a decent amount of text fits
on the screen. Such a DPI value would probably work best for most
cases.

There is ofcourse the issue of being correct - DPI given to Xfbdev
should be the physical DPI of the device and all software should adapt
to that. But we don't live in a perfect world and there's loads of 3rd
party software around that can't be changed so easily.

TIA,
-- Naked




More information about the framework-devel mailing list