LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-08-2006, 05:49 AM   #1
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Rep: Reputation: 62
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 , Oh well .

anyway.

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:

Quote:
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):

Quote:
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:

Quote:
xdpyinfo | grep "resolution"
And the resulting output will be :
Quote:
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):
http://www.mozilla.org/unix/dpi.html

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

EDIT: 7/11 ADD QUICK TWEAK GUIDE EXAMPLE FLUXBOX

The wiki for fluxbox for fonts is located at:

http://fluxbox-wiki.org/index.php/Howto_change_font

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

Example:

I copied

Quote:
/usr/X11R6/share/fluxbox/styles/BlueFlux
to
Quote:
/home/fogie/.fluxbox/styles
Now in a file titled:

Quote:
/home/fogie/.fluxbox/styles/BlueFlux/theme.cfg
on line Number 168

I found the following:

Quote:
*Font: Andale-10
and changed it to

Quote:
*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
Quote:
/home/fogie/.fonts
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

Quote:
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!

Last edited by Old_Fogie; 08-14-2006 at 09:28 PM.
 
Old 07-08-2006, 04:08 PM   #2
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
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
 
Old 07-08-2006, 04:28 PM   #3
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
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?

Last edited by Randux; 07-08-2006 at 04:30 PM.
 
Old 07-08-2006, 06:10 PM   #4
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

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

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

Quote:
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 07-08-2006, 06:15 PM   #5
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
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 07-08-2006, 06:17 PM   #6
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
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.
 
Old 07-09-2006, 09:00 AM   #7
Randux
Senior Member
 
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705

Rep: Reputation: 54
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?

Thanks,
Rand
 
Old 07-09-2006, 05:02 PM   #8
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
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 07-10-2006, 12:48 AM   #9
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
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.
 
Old 07-10-2006, 10:29 AM   #10
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,675

Rep: Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440Reputation: 1440
GREAT guide, OldFogie. Why don't you put in on SlackWiki and give it the permanent home that it deserves?
 
Old 07-10-2006, 12:07 PM   #11
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 65
Or in the tutorials section here at LQ?
 
Old 07-10-2006, 05:40 PM   #12
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
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.
 
Old 07-10-2006, 11:34 PM   #13
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
Hi all,

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

Enjoy.
 
Old 07-11-2006, 02:44 AM   #14
Yalla-One
Member
 
Registered: Oct 2004
Location: Norway
Distribution: Slackware, CentOS
Posts: 635

Rep: Reputation: 35
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?

Thanks,

-Y1
 
Old 07-12-2006, 04:13 AM   #15
Old_Fogie
Senior Member
 
Registered: Mar 2006
Distribution: SLACKWARE 4TW! =D
Posts: 1,515

Original Poster
Rep: Reputation: 62
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' ...now 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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i use 100 dpi fonts? webazoid Linux - Software 0 07-09-2004 06:21 AM
how to use 100 dpi fonts in mdk 10? webazoid Linux - Software 0 07-08-2004 06:56 AM
what's difference between 75 dpi and 100 dpi fonts? webazoid Linux - Software 0 07-06-2004 10:26 PM
Problem with Gnome fonts (DPI) after installining GTK+2 satellitejune Linux - Software 1 12-26-2003 08:41 PM
startx -- -dpi 100 .. automatically? doublefailure Linux - General 5 03-17-2003 10:19 PM


All times are GMT -5. The time now is 05:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration