Re: patch -- fix resolution in pango (win32 backend)
- From: Tor Lillqvist <tml iki fi>
- To: Joaquin Cuenca Abela <e98cuenc yahoo com>, otaylor redhat com, gtk-i18n-list gnome org
- Subject: Re: patch -- fix resolution in pango (win32 backend)
- Date: Tue, 21 May 2002 15:18:27 +0300 (EET DST)
I wrote:
> > > There usually is a way tell X11 the actual physical size of your
> > > display area.
Looking more close into this, the Xsun server for instance has the
command line options dpix and dpix, with which one can tell the
dimensions of the monitor. XFree86 has the DisplaySize option in the
XF86Config file. Exceed allows you to specify the monitor size in mm
in its configuration dialog.
The X Logical Font Description Conventions document says:
RESOLUTION_X and RESOLUTION_Y are unsigned integer-strings that
give the horizontal and vertical resolution, measured in pixels or
dots per inch (dpi), for which the font was designed.
Note "for which the font was designed".
Let's not confuse matters by considering the typical X11 bitmap font
directories for 75 and 100 dpi design sizes, and their order in a X
server font path. That is irrelevant, in Windows and in modern X
practice scaleable outline fonts are used.
Joaquín Cuenca Abela writes:
> The problem is not in code that assumes the same resolution in
> printers as in screen, but code that assumes that the same physical
> size is readable in screen only because it's readable in a printer
> (and that's what pango is doing right now).
I don't think Pango assumes anything about what is readable on a
screen. Surely it is the library or application that uses Pango that
specifies the size of font to use. Ultimately it is the user that
should be able to set things like this in preferences.
> yes, it does. It picks a default value for your physical screen
> size to match 75x75dpi. I've changed it in my computer to have
> 96x96dpi and now gtk+ 2 applications renders text at a much more
> comfortable size :)
But instead of pretending that your monitor's size is smaller (has a
higher dpi) than what it is, why not let X know the *true* size of it,
and ask the applications to use larger fonts? Wouldn't that be much
more straightforward?
Similarily for Windows, why use some silly 20-30% larger than actual
"logical inch", and pretend to use a 12 point font (which actually on
the screen is then maybe 14 points) when you could use true sizes, and
simply ask the application to use a 14 point font size in the first
place?
The X11 protocol specs says about the per-screen information:
Width-in-millimeters and height-in-millimeters can be used to
determine the physical size and the aspect ratio.
I couldn't find any other mention of millimetres, even less inch or
dpi. Certainly nowhere in the X Protocol specs is there any mention
of 75 dpi being a default resolution of a screen.
Now, if some X server by default, if the user hasn't bothered to
measure his monitor, applies a 75dpi guesstimate, well, that is just a
implementation-specific guess.
--tml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]