Font size problem #2
monnier at iro.umontreal.ca
Sat Nov 15 21:18:01 CET 2008
>> The correct solution is to decide that "dpi" means "pixels per
>> apparent inch." Because we look at the FR from much closer than we
>> do a desktop screen, the dpi that we set in /etc/X11/xorg.conf
>> should be somewhat less than the physical pixels per inch.
>> I estimate that I see a desktop screen from about 25 inches, and the
>> FR from about 10 inches. So the FR should be set to about 110
>> dpi. This would have about the same effect as using a font size of
>> 5 points.
I'm not 100% sure that it's "The Correct Solution", but I do think it's
the best solution and I indeed start my Xglamo with "-dpi 100" for that
> I believe introducing the "apparent" factor would create a huge mess
> instead of solving it. There would be no reliable way to tell how much
> is an inch - for example displaying a ruler with correct scale would
> be impossible. The strength of DPI is its ability of being measured.
> I have another solution of the problem - the toolkits of the clients
> asking the server about the preferred font size similar way they ask
> it about the resolution. I think it would not be possible or feasible
> to ask exactly the same way (does the X server expose preferred font
> size the same way as DPI?). The client-side apps might contact the
> corresponding server-side toolkit, which they already do (I noticed
> irregularities while connecting to a host with an old version of
> GTK). This would, however, require patches to the toolkits...
The problem is that many programs use "inches" not as a way to talk
about the size as measured on the screen (i.e. physical size), but as
a way to talk about the size as seen by the user (i.e. visual size).
Currently, those two issues are completely conflated (at least for all
apps I'm familiar with, under X11). So there's no way to fix one
without breaking the other. As it happens, I look at objects on my
screen a lot more than I measure them, so I don't care about the
physical size of pixels nearly as much as I care about their visual
size. So I ask my FR's X server to lie about its pixel density.
I originally tried to just adjust the font size, but it's a lot more
painful: font size is set at too many places, including at places over
which I have no control (e.g. web pages).
In theory setting DPI to 100 is the wrong solution, but in practice it
seems to be the best one.
More information about the community