-   Slackware (
-   -   a quick guide to getting 100 dpi fonts in X (

Old_Fogie 07-08-2006 05:49 AM

a quick guide to getting 100 dpi fonts in X
Hi all,

I spent alot of time trying to figure this out, and just wanted to put it here for any newcomers to slack.

background: slackware and most gnu/linuci's use 75dpi x 75 dpi fonts. windows uses 96 dpi x 96dpi by default. gnu/linux fonts never looked right to me and as I am new didnt have time to get into the fonts thing. obviously most webpages, etc are built with 96x96 in mind, so to render your webpages better and cleaner, you might find this helpfull.

I found that many people recommend 96x96. Now I got 96x96 to work just fine by my how to below, but found that console fonts were a little wierd looking on my eyes. Knowing that Pat gives you the "100 dpi package" in "X" section when you install slack 10.2 I decided to try out 100 dpi x 100 dpi and so now my KDE, fluxbox look really nice as do my terminals.

Basically be sure you have the x11-fonts-100dpi-6.8.2-noarch-3.tgz package installed off of the cd number 1 of slackware 10.2 If not install them, then in pkgtool -> setup->fontconfig to update your system fonts. Then the following:

Now for math:

25.4 is the conversion factor of inches to millimeters. Apparently X follows the metric system, darn Euro's, LOL :D, Oh well .


Example: 1200 x 900 desktop resolution to get 100 dpi by 100 dpi . (edit: you should substitute your x-servers "width x height" into where I show "1200" and "900" respectively if you are not using my desktop resolution that I use of 1200 x 900)

25.4 divided by 100 = 0.254 x 1200 = 304.8 (that's my milimeters for my width)
25.4 divided by 100 = 0.254 x 900 = 228.6 (that's my millimeters for my height)

Now edit your /etc/X11/xorg.conf file (as root you must edit it).

Under "Section "Monitor" you simply add the following then:


DisplaySize 304.8 228.6
EDIT: also confirm that under section "Files" you have the following line un-commented (e.g. no "#" before this line):


FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
Now save the file.

Restart the X server, and you will notice much nicer fonts.

EDIT: to verify that you are using 100dpi x 100 dpi you can issue the following command in console:


xdpyinfo | grep "resolution"
And the resulting output will be :

fogie@pooter:$ xdpyinfo | grep "resolution"
resolution: 100x100 dots per inch
Edit: add current browser tweaks.

To force mozilla to render your new fonts (from here):

The about: config in address bar for regular mozilla works in firefox too, when you get in just search in field for "resolution" and change accordingly.

To tweak opera as root edit your /etc/opera6rc for your new dpi you want.

Enjoy :)


The wiki for fluxbox for fonts is located at:

However, the long and short of my effort to tweak fonts for fluxbox is as follows, mileage may vary :D


I copied



Now in a file titled:


on line Number 168

I found the following:


*Font: Andale-10
and changed it to


*Font: Andale-8
I then hit save.

Now when I right click my fluxbox menu I go to "user styles" now I have an entry for BlueFlux, which is the modified one I just edited. Selecting that now utilizes the "Andale-8" font and not size Andale-10.

I also went in later and changed it to some fancy fonts as found in my

folder that KDE utilizes and it worked sweet for the same theme.

You can change the font path in fluxbox by editing line 28 where it says


xset +fp /home/your-username/custom-font-directory
where "custom-font-directory" is a folder with your fonts you have on your pc. I suppose the overall line could go anywhere that you have read access too. tho i haven't tried it.

Important to note:

- if you DO have anti-aliasing turned on then you WILL get the fancy fonts of size and type that you dictated in the theme.cfg file you have to appear in flux menu's, program borders, etc.

- if you do NOT have anti-aliasing turned on, then ONLY the size adjustment as described above is the only thing that will change.

- remember doing this tweak only adusts the fonts used in the borders of fluxbox, it's "right-click" menu and the bottom toolbar. it will not change the fonts of programs that you run.

-EDIT: 08/14/2006 Once you are done with the above guide, you may find that your fonts are much larger than they were prior to starting this guide. This is normal and to be expected. In KDE use the Fonts section in KDE control center to change your font sizes to your liking. In fluxbox, you edit the font size as I indicated before where you input your font 'type' in the "theme.cfg" I don't know how you change font sizes in XFCE, as I do not use XFCE.

Enjoy! :D

Randux 07-08-2006 04:08 PM

If I try this and I go blind I will not be able to complain about your advice because I will not be able to see this website :p

Randux 07-08-2006 04:28 PM

It didn't work so well here. My fluxbox menus and mozilla fonts got huge and it looked terrible. The other stuff like terminals and Emacs didn't look different from before.

Maybe this is because I copied all my winbloze fonts and had already chosen better fonts?

Old_Fogie 07-08-2006 06:10 PM

be sure that in xorg.conf you have "un-commented" (e.g. no # infront of":


FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
in section titled:


Section "Files"
I will add the above to my original post.

Regarding fluxbox: I use fluxbox alot, especially when I play games, to take out all the KDE stuff in the background. I use fluxbox with this on my laptop too, and no problems here. I wonder?? if maybe your issue is related to the way that fluxbox uses "anti-aliasing" of the fonts. The anti-aliasing in flux-box's right click menu is only for the window manager, it does not affect your fonts in web-pages. Try truning the anti-aliasing off for a moment and see what that does for you. I run the latest fluxbox on one pc and it does look better on that one IMO.

And yes, all font in KDE, fluxbox, will get larger at first, until you change them. Remember, we are more or less "simulating" the actual size that "windows" is using here.

Specifically : courrier size 10 in default install of slackware is MUCH smaller on screen that courrier size 10 in windows at the same desktop resolution.

For example: I noticed some of the MS fonts were very ugly on linux, and appeared smaller. Well that is because we are using a different dot pitch, and have not told "X" what our "mm" of our monitor is.

Another point of mention: in SuSe uses SAX2 to calibrate monitor size, dot pitch, etc. There is none of this in slackware, and hence our screens look bad to me IMO compared to windows. We are basically hand-configuring what our suse friends get with Sax2, and what the windows users see as default.

If you go into any windows, right click on the desktop, then into settings, then under fonts, you will see that windows defaults to 96x96.

Old_Fogie 07-08-2006 06:15 PM

randux I made some changes to original post, and also added sectin that you can confirm the dpi of your x server at the bottom of the original post too.

Old_Fogie 07-08-2006 06:17 PM

oh another thing, your mozilla fonts, can be reduced in size under "edit" then "preferences"

or you can just hold down control key and roll your mouse wheel up and down to adjust on the fly

or hold down control key and hit "-" or "+" keys.

bye for now.

Randux 07-09-2006 09:00 AM

OF yeah, I forgot about the anti-aliasing. It was odd because only the menu bars and menus and Mozilla went mad. I'll try out your suggestion and let you know.

Is the improvement that visible? If I already have winbloze fonts set up will the X settings make a difference or is the main issue the fonts?


Old_Fogie 07-09-2006 05:02 PM

Well for me, I noticed the following:
1. if I type a letter in open-office in linux, then I happen to reboot into windows and use open-office there, the fonts are the same size on the screen alone. Like I said I noticed that a size 10 font of anything in slackware looked smaller in linux than it did when in windows. And I use the 1200x900 resolution in linux and in windows.

I foresee this fixing an issue let's say if you type a letter, send it to someone, and they open it up and say, OMG your fonts are huge! You need more carrots in your diet. LOL.

2. Changing my resolution to be more in-line with MS dot pitch resolution definitely made a difference for web-pages. For example, just going to Microsofts web-site to check up-dates, etc even look better now.

3. I find myself less adjusting the size on the screen (bigger or smaller) in web-pages.

4. Everything in KDE looks soo much better to me.

5. I have a very good monitor on my desktop and the curves around fonts look so much better that there is so much more information being passed to my monitor for a given font.

You see web-designers usually shoot for 72 dots/inch for a jpeg on a web-page. But more advanced designers know that 96 is actually better, which is my opinion, but that is debatable. GNU/linux gives you 75 dpi, a little more than the 72 dpi most designers go for, but it simply does not look correct to me.

Especially given that a majority of the desktops out there in the world are windows, and uses a higher quality rendering dot pitch for fonts than gnu/linux.

Hope that helps you.

Old_Fogie 07-10-2006 12:48 AM

randux check out bottom of my first post, added a link in their for tweaking fonts in your brower, a link to mozilla's discussion on fonts.

dugan 07-10-2006 10:29 AM

GREAT guide, OldFogie. Why don't you put in on SlackWiki and give it the permanent home that it deserves?

cwwilson721 07-10-2006 12:07 PM

Or in the tutorials section here at LQ?

Old_Fogie 07-10-2006 05:40 PM

I would like to do that, was just waiting to make sure that I didn't get any "hey fogie you yo-yo u messed me up" kind of thing. :D

Old_Fogie 07-10-2006 11:34 PM

Hi all,

At bottom of post I added a section on how to change your font type and the font size for fluxbox.


Yalla-One 07-11-2006 02:44 AM

This works excellent - great input thanks!

Two questions though...

1 - I changed the font-size of KDE, but Konsole/terminal window remains at 10DPI - I can make it smaller for each session, but how do I change it permanently?

2 - How can I check if my browser is taking advantage of the 100x100 DPI settings?



Old_Fogie 07-12-2006 04:13 AM

mozilla and firefox tweaks near middle of the post. if you have problem let me know browser name I walk u thru it.

for "Konsole" KDE's terminal, when you click on your icon, konsole open's in "shell" mode by default, click on 'settings' then 'font' then 'custom' and pick out fancy font, size, etc. Then click on 'settings' then 'configure konsole' then 'session tab' under session box click on "shell" then over to the right for FONT, select custom now go back over to underneath the shell box and hit save session, hit OK then ok again.

now you told console to allways look at custom.

now your able to change and save on the fly: to do that from now on open konsole, setting font custom, pick what you want, and then hit setting save as defult.

All times are GMT -5. The time now is 03:53 PM.