[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#227217: mini-howto for the dpi/displaysize setting

Package: xfree86-common
Version: 4.3.0-0pre1v4
Severity: wishlist
Tags: experimental

As promised on IRC, here is my addition to the X FAQ which describes the
problem and the steps to configure X to have correct DPI value.

Another wish from me is: please create some symlinks in the doc
directories from FAQ.gz to ../xserver-xfree86/FAQ.gz and
../xserver-common/FAQ.gz . Reason: xfree86-common sounds to unnatural
for documentation to be found easiy, don't ask me why. I would NOT find
this FAQ if I would not already know that it exists.

Index: local/FAQ
--- local/FAQ	(revision 885)
+++ local/FAQ	(working copy)
@@ -967,6 +967,51 @@
     running, is listening on the TCP port, and/or engage in some network
+*) Why do some fonts have weird sizes?
+Programs that try to optimise font sizes for better screen output
+(Fontconfig based applications) and those that try to show real-world
+geometry (like inch/centimeter scales in Gimp) need the correct setting
+of the dot resolution. This is the ratio between the display's pixel
+resolution and the physical size of your monitor, mostly something
+between 70 and 120 dpi (dots per inch). If the dot resolution known by
+the X server does not match your resolution/monitor data, modern
+applications will show the fonts with apparently wrong sizes (too small
+or too large), based on wrong expectations of the monitor size. You can
+use the program xdpyinfo (package: xbase-clients) to check the
+assumed monitor size and dot resolution.
+The dot resolution setting is handled by the X server internally.
+Unfortunately, there is no good way to auto-detect the monitor size
+so you should configure it by hand. The setting can be specified with:
+ - (method 1) the -dpi option for the X command
+ - (method 2) calculated on startup based on the DisplaySize variables
+   in XF86Config-4. See XF86Config-4(5x) for details.
+The first method is recommended if you already know the dot resolution
+of your monitor and wish to always run it in the same resolution, and
+the second method is the more flexible way.
+To configure, locate and edit the script which starts the X server:
+  /etc/X11/xdm/Xservers (for xdm)
+  /etc/X11/xinit/xserverrc (for startx (xinit))
+  /etc/kde3/kdm/Xservers (for kdm (kde3))
+  ...
+ - For method 1, replace the value after -dpi with the correct number. 
+ - For method 2, remove the -dpi word and the following number. Then
+   edit /etc/X11/XF86Config-4 and locate the "Monitor" section there.
+   Add a line like:
+   DisplaySize     288 216
+   to it. The numbers above are X and Y sizes of the monitor's screen
+   (in milimeters) which you can often find in the monitor's manual.
+When done, restart the X server and use xdpyinfo to check the new DPI settings.
 *) Why doesn't the X server package just depend on the xfonts-base package?
 (I often get this question, accompanied by rhetoric like, "1 CANT BEL1EVE U

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux debian 2.4.23-rc3 #3 So Nov 23 19:25:21 CET 2003 i686
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8

Versions of packages xfree86-common depends on:
ii  debconf                       1.4.2      Debian configuration management sy
ii  debianutils                   2.6.1      Miscellaneous utilities specific t

-- debconf information:

Reply to: