FS#6342 - firefox font too small on xfce4

Attached to Project: Arch Linux
Opened by Eugenia Loli-Queru (Eugenia) - Monday, 05 February 2007, 01:31 GMT
Last edited by Roman Kyrylych (Romashka) - Tuesday, 06 February 2007, 11:30 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture not specified
Severity Medium
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

the default font is extremely small on firefox when used under xfce4. This is a bug.Epiphany does not have the bug when loaded under xfce4.
This task depends upon

Closed by  Jan de Groot (JGC)
Sunday, 25 February 2007, 17:46 GMT
Reason for closing:  Fixed
Additional comments about closing:  xorg-server 1.2.0-2 is patched to default to 96 DPI when nothing is specified and autodetection failed.
Comment by Eugenia Loli-Queru (Eugenia) - Monday, 05 February 2007, 01:37 GMT
Apparently, ALL fonts in XFce are wrong compared to KDE and Gnome font sizes. What I mean is, that if you specifically specify via GTK or Qt the size of a font in an application, it will show normally in Gnome/KDE, but when viewed under XFce the font will be smaller. It seems that XFce reads ALL fonts with 1-2 sizes smaller than they normally are.
Comment by Jan de Groot (JGC) - Monday, 05 February 2007, 08:09 GMT
Check xdpyinfo | grep res, it should come up with something like 96x96dpi. AT least gnome specifies this as default, I guess XFCE detects it as reported from the X server, in which case your videodriver is providing the wrong information (nvidia, fglrx?)
Comment by Eugenia Loli-Queru (Eugenia) - Monday, 05 February 2007, 08:37 GMT
eugenia@lc2430:~> xdpyinfo | grep res
resolution: 75x75 dots per inch
ButtonPressMask ButtonReleaseMask LeaveWindowMask


I use the Xorg driver for my ATi 9000 Mobility, open source driver. Any way to fix the problem?
Comment by Jan de Groot (JGC) - Monday, 05 February 2007, 08:41 GMT
Do you start X with -dpi 75 or something like that? If so, set it to start with -dpi 96. You could also try to open the XFCE font configuration program and set the resolution to 96dpi. Though this is probably wrong for your high-res display, this is the value that is assumed as default by most common desktops. I don't know where the option is exactly located, as I use GNOME instead of XFCE.
Comment by Eugenia Loli-Queru (Eugenia) - Monday, 05 February 2007, 09:03 GMT
No, I don't start X with anything weird. I simply use the default stuff with gdm. How could I change that? As for the XFce font configuration panel, it does not let me select DPIs.

Any other ideas? My screen is 15" and the resolution is 1400x1050.I can't use XFce because of the font issue...
Comment by Eugenia Loli-Queru (Eugenia) - Monday, 05 February 2007, 09:35 GMT
I found a tutorial online. You have to add this line
Xft.dpi: 96
to this file: ~/.config/xfce4/Xft.xrdb

Maybe you could fix this for all XFce installations somehow?
Comment by Jan de Groot (JGC) - Monday, 05 February 2007, 19:06 GMT
About the font issues, I think this blog post describes the problem best:
http://primates.ximian.com/~federico/news-2007-01.html#font-sizes
Comment by Eugenia Loli-Queru (Eugenia) - Monday, 05 February 2007, 20:08 GMT
Can it be fixed for Arch Linux?
Comment by Scott H (stonecrest) - Tuesday, 06 February 2007, 05:54 GMT
If you start xfce with "startxfce4", it automatically tries to set the dpi to 96x96. If you look at the startxfce4 script, it calls /opt/xfce4/etc/xdg/xfce4/xinitrc which has the lines:
Xft.dpi: 96
Xft.hinting: 1
Xft.hintstyle: hintmedium
Comment by Eugenia Loli-Queru (Eugenia) - Tuesday, 06 February 2007, 06:05 GMT
If what you say is true, then, it's a bug of Arch Linux that resets these values.
Comment by Roman Kyrylych (Romashka) - Tuesday, 06 February 2007, 10:27 GMT
"it's not a bug, it's a feature" (C)
startxfce4 sets DPI to 96, and this is what mainstream does. Arch Linux usually doesn't change mainstream's behaviour.
startxfce4 was designed as easy script to start Xfce for users that don't wan't to bother with .xinitrc and settings.
You should start Xfce with xfce4-session from .xinitrc if you wan't it to respect all your X settings.
Comment by Jan de Groot (JGC) - Tuesday, 06 February 2007, 10:47 GMT
Reopening: When launched via gdm, the resolution doesn't get set to 96 dpi. As shown in the blogpost, resolution should actually be hardcoded to 96 dpi as relative settings to things detected by X aren't the thing people want.
Comment by Roman Kyrylych (Romashka) - Tuesday, 06 February 2007, 11:25 GMT
I'm a bit confused now. What we are talking about?

Why it's not the thing people want? Different people want different things. There's no way in universe to satisfy all.
Why resolution should be set to 96 DPI when launching with GDM?
"My screen is 15" and the resolution is 1400x1050" - but the physical DPI for this is much closer to 120, than to 96DPI.
I used http://lcdtech.no-ip.info/data/pixel.size.htm for calculation (sorry, it's in Russian) and got 116 DPI.
IMO DPI should be as close to physical values as possible. I hate windoze for always defaulting to 96 DPI.

Eugenia, you start Xfce from GDM, what DPI you get when starting it as xfce4-session and as startxfce4?
Do you have any manual DPI setting in Xorg, if not then try to set DPI there and see if it works.

Jan, what do you think about this patch: http://bugzilla.gnome.org/show_bug.cgi?id=378338 ?
Comment by Eugenia Loli-Queru (Eugenia) - Tuesday, 06 February 2007, 19:16 GMT
Roman, XFce should be CONSISTENT no matter how you start it. I agree with you that 96dpi is not always what people need, but the point is, it is unacceptable to have XFce use 96dpi when started from the command line and 75dpi when started from GDM. There should be some consistency, short of actually fixing Xorg to do a proper detection.
Comment by Roman Kyrylych (Romashka) - Tuesday, 06 February 2007, 19:37 GMT
About consistency - startxfce4 sets DPI to 96 because that is what _mainstream_ devs have decided, and it always was so.
And because Arch tries to keep packages as much close to vanilla as possible - it wasn't changed.

Eugenia, you still haven't said what method of running Xfce do you use, I don't know which command your GDM calls - xfce4-session or startxfce4. And please tell if manual DPI setting in xorg.conf helps.
Comment by Eugenia Loli-Queru (Eugenia) - Tuesday, 06 February 2007, 19:38 GMT
I have already said that I use GDM. All you have to do is read GDM's XFce shortcut, I use the default ones as come with Arch Linux. I am not on my Linux machine right now, so all you have to do is check it out on your own machine.

As for xorg.conf, where exactly do I add what?
Comment by Scott H (stonecrest) - Tuesday, 06 February 2007, 19:54 GMT Comment by Roman Kyrylych (Romashka) - Tuesday, 06 February 2007, 20:14 GMT
Well, I'm not on Linux now too. :)
But by searching on my local mirror I found Exec=startxfce4 in xfce.desktop in xfce-utils package - which means GDM starts startxfce4. And startxfce4 should set DPI to 96 when it cannot find Xft.xrdb. The only file that can override DPI after Xfce set it to 96 using fallback is ~/.Xresources.

Eugenia Loli-Queru (Eugenia):
> I found a tutorial online. You have to add this line
> Xft.dpi: 96
> to this file: ~/.config/xfce4/Xft.xrdb
Have you tried this?
Comment by Eugenia Loli-Queru (Eugenia) - Tuesday, 06 February 2007, 20:19 GMT
Yes, of course and I tried it, it worked. But this is not the point. The point is that what happened to me, should not happen to other users and users should not have to edit anything manually like I did. I don't know why Xresources set the dpi to 75 (if it's the Xresources the culprit). BTW, I have this Arch Linux installation for over 2 years now, maybe upgrades over upgrades had something to do with it.
Comment by Roman Kyrylych (Romashka) - Tuesday, 06 February 2007, 20:34 GMT
> Yes, of course and I tried it, it worked. But this is not the point.
It is the point. Without this file starting Xfce with startxfce4 should behave exactly in the same way.

> I don't know why Xresources set the dpi to 75 (if it's the Xresources the culprit).
In your case it's not .Xresources, becaue it it was it then Xft.xrdb wouldn't matter at all.
Xfce checks fot Xft.xrdb, then fallbacks to 96DPI, then it may be overridden by .Xresources.
In your case something is weird.

> BTW, I have this Arch Linux installation for over 2 years now, maybe upgrades over upgrades had something to do with it.
Maybe.
Check if you have ~/.config/xfce4/xinitrc or ~/.xfce4/xinitrc.

Is there any arch user except Eugenia with the same issue?
Comment by Jan de Groot (JGC) - Tuesday, 06 February 2007, 22:10 GMT
It happens to me also when I connect to gdm with Xephyr (xorg-server-1.2.0-1 from testing). Kdrive X servers have this line in the source:

if (!monitorResolution)
monitorResolution = 75;

In the normal X server, this is set to DEFAULT_DPI for X and Y resolution, which is defined as 75. DPI sizes are set like this:
- commandline -dpi option
- display dimensions specified in xorg.conf
- DDC information from your monitor
- The default resolution, which is 75dpi

I still have to fix some issues in xorg-server 1.2.0 (mainly fontpath and dependency issues, for the rest it's fine), I will patch xorg-server to set default resultion to 96 DPI, which is a sane size unless you specify something else. IMHO this should be fixed serverside, not clientside with hacks that gnome and startxfce4 do. (yes! finally a standard fontsize that is equal in every environment!)
Comment by Roman Kyrylych (Romashka) - Tuesday, 06 February 2007, 22:20 GMT
That's very good news, JGC.
Does Xorg 7.2 really does more autodetection as they promised?

Though I'm still curious why ~/.config/xfce4/Xft.xrdb worked while fallback (few lines below in startxfce4) wasn't. :-/

Loading...