Debian font size strange behaviour
Hello Linux folk
I have two similar PCs with the same Debian 4 (Etch) with non-free NVIDIA driver installed on each, and running KDE. Both have size 11 San Seriff font, and identical unforced DPI (dots-per-inch) resolution setting. One looks crisp, and the fonts are reasonable, even for my eyes, while the other has them tiny, minute little things. One clue may be that when I use Log out --> End current session, on the tiny fonts PC, and then do a console login, and then do "startx", the resulting screen suddenly changes to nice fonts the same as the first PC, BUT ..., opening the Konsole terminal then delivers huge fat black letters. Getting fonts right in installations is not easy. They all will do something different. Whether its the fonts in applications like Iceweasel, or in menus, whatever. I could use a little help in knowing where to look to resolve this one, so that the standard graphical login works, and we don't have to ask for fonts size 15. Thanks |
I vaguely remember having that sort of problem before. What I think is going on is that there are two places where the dpi setting are being defined--one is in /etc/gdm.conf, which will only be "activated" if gdm is running (it will be skipped with "startx"). I'm not sure what the equivalent is with kdm if you're using kdm. Anyway, by default I think gmd.conf has 96dpi set.
The other place where the dpi setting may be defined is indirectly, within /etc/X11/xorg.conf. Here, the monitor may have options for defining the display size in millimeters. In the past, I got things to work the way I wanted by defining the display size in millimeters in /etc/X11/xorg.conf. But lately, I just leave out that option and am generally satisfied with the default 96dpi. However, I only use CRT monitors which don't send detailed monitor info to the computer. Things might be different with an LCD monitor, which might feed the computer funny data. In particular, 72dpi is a common standard. It actually makes a LOT more sense than the Windows-default of 96dpi. With the Mac-style 72dpi standard, the size of a font equals the height in pixels, meaning you can specify any desired line spacing with pixel precision. With Windows-style 96dpi, each font point is equivalent to 4/3 pixels, meaning not every pixel height is available. With 72dpi, a 12 point font will only be 12 pixels tall. With 96dpi, a 12 point font will be 16 pixels tall. Anyway, assuming you're using gdm, post your /etc/gdm.conf, and /etc/X11/xorg.conf files. Also, some information about the monitors may be necessary. |
If you use kdm, you can set the dpi in /etc/kde3/kdm/kdmrc
Edit the "ServerArgsLocal" line by adding "-dpi 96" to start x with a dpi of 96. |
nVidia graphics card
If you are using an nVidia graphics card you can set the DPI with some options in the drivers section.
The tag for setting DPI in standard Xorg server: /etc/X11/xorg.conf ->Section "Monitor" add DisplaySize <width> <height> then use $ xdpyinfo |grep resolution to see what it set and adjust. You can also grep the /var/log/Xorg.0.log or whatever for the assigned display size. |
My thanks to all of you. I now have quite nice fonts setup. During this little struggle with fonts, we have learned that fonts are affected, and can be controlled from many places.
1. The X settings that affect DPI are the most fundamental, and scale the size of everything, fonts included. /etc/X11/xorg.conf can be given sets of definitions for monitor profiles, and within those, set of definitions for exactly how the video will be clocked out for various standard display resolutions. You go here at your peril. Usually, when you install your distro, this is where you set the highest, and various other lower resolutions your GUI can have available. There are very detailed descriptions on how to turn a xorg.conf.example into what suits you in the excellent Gentoo documentation, (even if we don't use Gentoo!), and of course from x.org. 2. At the next level, how the display manager (kdm, xdm, whatever), deals with fonts and DPI is more selective. With KDE, if one uses the Menu -> Control Center -> Appearance and Themes -> Fonts route, then there is the opportunity to select "Force fonts DPI" to be 96 or 120. it requires a complete logout, and re-login for the effect to reach everywhere. My apologies that this text is "KDE-centric", but I am sure others can contribute gdm and gconf equivalent descriptions. I know Gnome can grow on one, and has some attractive features, but I never gave it a fair chance (so far!) 3. Then there are the ways a user gets to overide these, and have desktop fonts to his choice. For KDE, in /root, and in every /home/username folder, there is a hidden .kde/share/config/startupconfig shell script, and also a .kde/share/config/startupconfigkeys text file. The text file has the few lines .. Code:
kcminputrc Mouse cursorTheme '' Code:
"startupconfig" #! /bin/sh 4. Then we come to what happens in applications. After messing with DPI, the chosen fonts in Konsole and similar edit-type applications may need attention. A very common one is the Synaptic package manager. After you have finished tweaking the DPI, and settled for a comfortable font size for the desktop, you can find the fonts in Synaptic very tiny small. From within Synaptic, choose Settings -> Preferences -> Columns and Fonts and tick the box "Use custom application font", and then click the "Application Font" option and fix it up to suit yourself. 5. Iceweasel has two kinds of fonts you will be interested in. One is the whole set of fonts that web pages will use, and the other kind is the font in the toolbars and menu. The web pages fonts is straightforward to meddle with using Iceweasel -> Edit -> Preferences -> Content and then click the "Advanced" button in the "Fonts and Colours" section. Getting the rest of the application fonts to a nice size requires to meddle with the user's .mozilla/firefox/adk36las.default/chrome directory. You use the supplied file userChrome-example.css, and save a copy as userChrome.css. Then edit it by adding the end lines to force your font choice for Toolbars, Menus, etc. thus:- Code:
*{ It seems that exactly the same thing can be achieved by simply typing "about:config" into the URL entry line. and then seeking the right line to edit (trying not to get distracted). Right click and choose "Modify". The edited line comes up bold. I tried this, but it did not seem to "stick". Maybe I missed some save step, but anyway, I settled for editing the file directly. 6. Konqueror has three aspects to setting fonts. One is what appears in the Toolbar Menus and related boxes. This it seems to pick up automatically to be the same as was chosen for the desktop. The next is the fonts under the folder icons when Konqueror is being a file manager. This is done with Konqueror -> Settings -> Configure Konqueror -> Appearance. Finally, the group of fonts that will apply to web page contents is further down the list under "Aa Fonts" selection. Even after you have selected them all, Konqueror provides a special separate "Font size adjustment for this encoding" to shift the whole lot larger or smaller at will. While I am sure that most applications will have some way of tweaking the fonts that may be involved in its display or use, the methods do vary, and can get obscure. While all the above may be just plain obvious to some, it took me quite a while to uncover it all, and may not be the best or slickest setup. I did not elaborate on xorg.conf because I hate the thing. It is easily the file I am most prone to mess up, and the effects can be so catastrophic. I hope some will find this useful |
Thank you for the detailed account of the solutions you found :).
|
All times are GMT -5. The time now is 05:14 AM. |