Gutsy Kubuntu font problems

Felix Miata mrmazda at ij.net
Fri Oct 19 13:07:41 UTC 2007


On 2007/10/19 12:33 (GMT+0200) Anand Buddhdev apparently typed:

> I'd been happily using Kubuntu Feisty Fawn (7.04) until yesterday, and 
> then I upgraded :( Here's the problem.

> I have an Nvidia card, and an Acer 19" flat screen running at 1280x1024.

This combination's actual DPI is 86.3.

> On Feisty, I set all my desktop fonts to DejaVu Sans, size 11. This is the 
> perfect size for my eyes. I also set GTK to use the same font at size 11. 
> This allowed Firefox and a couple of other GTK applications to work at 
> the same font size. All applications (with the exception of OpenOffice) 
> looked the same, and I was happy with that setup.

> On Gutsy, it has all gone wrong. The fonts look bigger than they did on 
> Feisty. If I select 10-point fonts, they become too tiny. It's like 
> there's a big jump in size from 10 to 11. Strangely though, the GTK 
> applications continue to show the fonts properly. This "problem" only 
> affects KDE apps.

> I read that in Gutsy, the DPI from the X server is now used to render 
> fonts, instead of the fixed default of 96.

It used to be that the X server DPI was used by everything, which would fall
back to 75 DPI if none of the auto-determining mechanisms worked. Then
various systems were employed to make DPI "corrections" that make Linux DTEs
behave like windoz. Windoz assumes in conventional installations a DPI of 96.
That underlying foundation is inherent in many web pages created by windoz
users, with the result that Linux users would generally find that their 75 or
accurate and/or otherwise <96 DPIs would frequently cause too small web page
text. So e.g. Konq and Firefox set a floor DPI of 96 to compensate, meaning
users of DPIs less than 96 would see web pages displayed at 96 DPI, and those
with higher DPIs would see web pages displayed at their actual X DPI. This
difference actually doesn't affect most web pages, because DPI only affects
things sized in absolute units, pt in particular, and depending on version,
may or may not affect the browser UI text. Nevertheless, the snowball was
started rolling down the mountain. Now there are even more different ways to
implement DPI at various levels:

App-specific DPI
DTE-specific DPI
EDID
DisplaySize
Xft.dpi
xrandr fallback (96)
X-fallback (75)

How well they work and which actually control depends on:

hardware
driver version
DTE
app
xorg version
xrandr version

> I therefore attempted to fix
> the DPI by applying the following settings in xorg.conf

> in the driver section:

> Option "UseEdidDpi" "False"

IIUC, UseEdidDpi doesn't work if using the generic nv driver. For the generic
driver it's possible	'Option	"NoDDC"'	will do what you need.

> Option "DPI" "96 x 96"

I wasn't aware this existed. Where did you find it?

> I restarted X, and xdpyinfo shows that my DPI is now 96x96. However, the 
> font situation did not change.

The DPI reported by xdpyinfo is no longer a reliable way to determine the DPI
used by everything in your DTE. 'xrdb -query | grep dpi' will tell if Xft.dpi
is set, and most modern apps will prefer its setting to the generic X
setting. You can customize Firefox by going into about:config and changing
layout.display.dpi from -1 to 0 and then visit
http://mrmazda.no-ip.com/auth/dpi-screen-window.html to see what most apps
find the working DPI to be. Without first changing layout.display.dpi to 0 on
your 86 DPI display Firefox will almost certainly report 96.

> In the KDE control panel, I also tried the setting to force fonts at 96 
> DPI. Also no difference. The fonts are either too small at 10-point, or 
> too big at 11-point. What is weird though, is that if I turn the force 
> DPI setting back to OFF, the fonts in newly started applications display 
> at the proper size (like they did on Feisty). However, this is only 
> temporary, and the effect disappears if I log out and back in again. It's 
> truly frustrating.

Xorg and the video drivers it uses have for several months been going through
a transition designed to make life easier for those with multiple displays.
It isn't over yet. At this point (fresh Gutsy release), things are too mixed
up for any single solution to apply to problems like you're encountering.

> I am so annoyed with this upgrade, that I am seriously considering going 
> back to Feisty (at least for now). My Feisty desktop was pleasure to work 
> with, and the font rendering was beautiful. KDE and Gnome/GTK apps all 
> used the same uniform font.

> What have other people experienced? Is there a fix in the works for this 
> font problem?

You probably have four choices here:

1-Stick with Feisty until Hardy is released
2-Try using Liberation Sans instead of DejaVu Sans
3-Try different anti-alias configurations. They often affect size somewhat.
4-Dig into the bowels of Gutsy to ensure everywhere that can control DPI is
set to the same setting, either 96 if that's what you prefer, or any other
DPI that manages to get the results you're after

For the latter, try starting with Option "NoDDC". If that's no help, edit
/etc/kde3/kdm/Xsetup, adding one of the following lines at the top:

xrandr --dpi 96
xrandr --fbmm 377x301

The result of the former should be obvious, forcing xrandr to use 96. The
latter will force it to use your actual display dimensions, resulting in 86.3
or thereabouts. As with DisplaySize (when it works), you can force any
particular DPI you want this way. There's nothing compelling you to use your
actual display dimensions, so you can use false dimensions as a customization
tweak. Some optional values you may wish to choose from are at:
http://mrmazda.no-ip.com/share/DisplaySize
-- 
"The basis of our Bill of Rights comes from the teachings
we get from Exodus and St. Matthew, from Isaiah and St.
Paul.	                       President Harry S. Truman

 Team OS/2 ** Reg. Linux User #211409

Felix Miata  ***  http://mrmazda.no-ip.com/




More information about the ubuntu-users mailing list