Mozilla, GTK+ Small and Huge Font Size problems fixed!

Doug Reich dreich at hmc.edu
Tue Feb 24 12:53:34 PST 2004


I'm writing this email in exultation at finally solving my long-standing
font problems which seem to be shared among other LFSers (and other users
of Linux).

The problem: when starting GTK apps, some or all text would be tiny and
unreadable for some users, or huge and unreadable for others. I had the
former problem. Some of the text sizes could be controlled using the
"gtk-font-name" descriptor in the .gtkrc-2.0 config file (on a per-user
basis), but there was also a whole class of text that could not be fixed.

The solution: the problem doesn't arise from GTK, but from X itself. In
the XF86Config file, there's a section called "Monitor" under which
there's an entry called "DisplaySize". I had foolishly set DisplaySize to
1024 768, thinking that it called for pixels, when in fact it calls for
the millimeter measurements of the your monitor. Hence, when X was
calculating the DPI, it would have a much-too-large value for my monitor
(because it thought the screen was a meter across). By just commenting out
this line, all problems were solved, the DPI was correctly calculated, and
life is good.

If you don't have access to the XF86Config file, but experience this
behavior, then by calling "startx -- -dpi 75" then you can manually set
the DPI (in this case to 75). You can make an alias or wrapper to keep
from having to type this each time you want to start X.

-Doug Reich



More information about the blfs-support mailing list