Resolution indpendence

Steven J Newbury steve at snewbury.org.uk
Tue Jun 24 21:14:41 PDT 2008


On Tue, 2008-06-24 at 18:26 -0700, Mohan Parthasarathy wrote:
> 
> 
> On Tue, Jun 24, 2008 at 5:11 PM, Steven J Newbury
> <steve at snewbury.org.uk> wrote:
>         
>         On Tue, 2008-06-24 at 23:27 +0200, drago01 wrote:
>         > On Tue, Jun 24, 2008 at 10:42 PM, Mohan Parthasarathy
>         > <suruti94 at gmail.com> wrote:
>         > > Hi,
>         > >
>         > > Both Mac OS X (Starting with Tiger and then in Leopard)
>         and windows XP/Vista
>         > > (WPF) supports
>         > > resolution independence. In Mac OS X, there is a concept
>         of scaling factor
>         > > which automatically
>         > > scales the UI (not sure how well it works). If i am
>         developing a graphics
>         > > application on Linux,
>         > > how does this work ? What should the application do to
>         handle different
>         > > resolution ? I understand
>         > > that i can set different screen resolutions. But from the
>         application
>         > > perspective, what should be
>         > > done for getting the UI (fonts, text, images...) scale
>         better ?
>         >
>         
>         X uses the display DPI as calculated from the monitor
>         dimensions and
>         resolution.  Most toolkits should make this pretty
>         transparent,
>         unfortunately some desktop UI's seem to have "standardised" on
>         96dpi and
>         fail to ensure their dialogs, pop-ups etc scale correctly.
>          The key here
>         is to not use pixel units...
> 
> Recently i have had some bad experiences when playing around with new
> range of PCs with 7 inch
> screen (e.g., everex cloudbook). I don't know where the problem is.
> Apparently installing
> ubuntu on it worked pretty well. When you say "Desktop UIs", where is
> the problem ? Could you
> give me a couple of example, i am trying to understand this better. If
> i use the standard toolkit
> GTK, Qt should it all be fine ? Or i should take some special care ?
> 
Yes, the toolkits are fine.  The problems I've encountered recently are
in GNOME, where some of the pop up windows (such as the
gnome-power-manager notifications) are not scaled to the font correctly
and as such all the text isn't displayed.  Also, many resizeable windows
have their inital size set to what the developer expected to allow for
the contents of the window.
> Recently i read an article comparing Windows Composition Vs Apple
> Quartz Composition. One of the claims
> is that Vista composition model uses vector level retention and hence
> scales better than Apple Quartz
Yes, Vista deals with this at the composition level thereby "fixing"
legacy (broken IMHO) applications using hw scaling of the window
contents where the application doesn't flag that it explicitly supports
resolution independence.
> stuff where Composition is done after the rasterization (don't know
> how it works today in Mac os X leopard).
> How does Composition in X work ?
> 
X provides the mechanism (Composite extention), but doesn't set the
policy for how the compostion works, that is provided by the compostion
manager (usually integrated with a window manager such a compiz,
metacity, or kwin).  Resolution independence, where it exists within
modern X environments is handled for font rendering by the Xft font
renderer and otherwise at the toolkit level making use of the DPI
information supplied by the X server (although this is often overidden
and set manually to 96dpi).

> 




More information about the xorg mailing list