Red Hat Bugzilla – Bug 47868
Fonts do not scale with the Xserver DPI setting
Last modified: 2007-04-18 12:34:33 EDT
Description of Problem:
The Xserver's dpi setting (as probed by the ddc module or set with the -dpi
flag) has no effect on the size of fonts.
This is a particular problem when running X in high resolution modes (e.g.
1600x1200) where the dpi can be 135 leading to unreadable fonts.
Steps to Reproduce:
1. Run "X -dpi n :1 & xterm -display :1". Replace n with a dpi value.
2. Run a program which allows you to view different fonts (e.g.
gfontsel or mozilla). Note the size of a large (e.g. 72pt) font.
3. Repeat for different n.
The font sizes are identical at different values of n.
Changing n from 100 to 150 should result in a noticable increase in the
size of a font.
Tested with XFree86-4.0.3-5 from 7.1 and 4.03-22 from RawHide with both ATI
Radeon QD rev 0 (both "radeon" and "ati" drivers) and NVidia GeForce2 GTS
rev 163 ("nvidia driver) with NVidia GLX & kernel module v1.0-1251.
Tested with and without xfs. Also tried adjusting the value of the
default-resolutions parameter in /etc/fs/config.
Tested with bitmap, type1 and TrueType fonts.
The dpi setting in Mozilla doesn't seem to make a difference either.
For most cases, this is normal and expected behavior -- X only comes
with two varieties of fonts -- 75dpi and 100dpi, and the choice
between them is determined by the order of your fontpath.
Some programs may take resolution into account beyond this -- for
instance, GTK+ version 2.0 ignores the resolution setting for fonts
and picks the nearest bitmap font based on the pixel size of
the fonts and the resolution -- but this is not common behavior currently.
I don't know the details of the algorithm that mozilla uses for choosing
font sizes. You might want to try switching to a scaleable font (such
as URW Helvetica, insetad of Adobe Helvetica) and see if that makes it
more responsive to resolution changes.
Indeed, as Owen has said, X comes with 75dpi and 100dpi fonts only, and
scalable fonts. If the fonts do not look great, don't use the 100dpi/75dpi
fonts, but instead use Type1 and truetype which looks great.