|
|
|
April 30th, 2008
11:34 am - Why mozilla needs a freedesktop.org liason So I finally got fed up with fonts on half the sites i visit (including LJ) being gargantuan in Firefox 3. I managed to track it down to this bug [https://bugzilla.mozilla.org/show_bug.cgi?id=384090].
Yay, it's fixed!
Then I read this gem:
"Well, the correct way to set font DPI on the Linux desktop is with the /desktop/gnome/font_rendering/dpi gconf key."
*sigh*
|
Comments:
![[User Picture]](http://p-userpic.livejournal.com/13361999/367921) | | From: | psykil |
| Date: | April 30th, 2008 05:47 pm (UTC) |
|---|
| | | (Link) |
|
yes, i misspelt gnome in my reply. i'm so ashamed.
![[User Picture]](http://p-userpic.livejournal.com/13361999/367921) | | From: | psykil |
| Date: | April 30th, 2008 06:53 pm (UTC) |
|---|
| | | (Link) |
|
PS - I solved the problem by setting layout.css.dpi to 96 in about:config, as mentioned in the bug, so it's not a total loss.
| From: | (Anonymous) |
| Date: | April 30th, 2008 11:46 pm (UTC) |
|---|
| | Gnome way of setting fonts | (Link) |
|
Go to: System -> Preferences -> Appearance -> Fonts -> Details
Top left corner has a DPI.
This changes all of Gnome too, however.
![[User Picture]](http://p-userpic.livejournal.com/13361999/367921) | | From: | psykil |
| Date: | May 1st, 2008 02:10 am (UTC) |
|---|
| | Re: Gnome way of setting fonts | (Link) |
|
Heh. The point I was making is that I don't use Gnome. Therefore, while "fixing" Firefox to read the DPI from gconf works great for Gnome users, the rest of us are left hanging.
| From: | (Anonymous) |
| Date: | April 30th, 2008 10:01 pm (UTC) |
|---|
| | | (Link) |
|
this is so stupid.
There are a lot of ways to get the right DPI - starting with xdpyinfo.
Not everybody uses gnome - and a lot of people who don't use gnome don't want their system cluttered with useless gnome-crap just because the mozilla guys are too stupid to use standard tools.
Somebody needs to beat them with the cluehammer 80 000 (kg).
The basic issue is that *screen DPI* and *font DPI* on high-resolution displays are usually completely different numbers.
xdpyinfo gives you the screen DPI; the Xft/DPI XSETTINGS gives you the font DPI. The firefox bug was caused by firefox using the screen DPI (i.e. xdpyinfo) in some places where it should have been using the font DPI instead.
I made that comment about "the correct way to set font DPI". And I was wrong; at the time, I did not know better. Now, let me explain the real story of how font DPI is set on the Linux desktop. The whole thing is done through a weird mechanism known as XSETTINGS. First, you need to be running a program called an XSETTINGS manager; in GNOME, this role is played by gnome-settings-daemon, KDE probably has something similar. The XSETTINGS manager places a hidden window on every screen of your X display. The hidden windows are marked as owners of a special X selection; the one for screen 0 owns the _XSETTINGS_S0 selection, etc. Then any time some program wants to render some text and needs to check for font DPI, it looks for the XSETTINGS manager's hidden window, reads and parses that window's _XSETTINGS_SETTINGS property, and looks for the Xft/DPI field (which contains the font resolution, in units of milliDPI). The Gtk+ way of getting at this information is gtk_settings_get_for_screen(screen); dpi = gdk_screen_get_resolution(screen); See http://standards.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html for the gory details of XSETTINGS specification. |
|
|
|
|
LiveJournal.com |