Bug 47868

Summary: Fonts do not scale with the Xserver DPI setting
Product: [Retired] Red Hat Linux Reporter: Robert Clark <robert3>
Component: XFree86Assignee: Mike A. Harris <mharris>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: otaylor
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-07-10 19:24:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Clark 2001-07-08 14:11:45 UTC
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.

How Reproducible:
Every Time

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.

Actual Results:
The font sizes are identical at different values of n.

Expected Results:
Changing n from 100 to 150 should result in a noticable increase in the
size of a font.

Additional Information:
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.

Comment 1 Owen Taylor 2001-07-10 19:24:07 UTC
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.
(/etc/X11/fs/config)

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.


Comment 2 Mike A. Harris 2001-07-12 17:45:46 UTC
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.