LinuxQuestions.org
Register a domain and help support LQ
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 12-13-2008, 12:57 PM   #1
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,223

Rep: Reputation: 177Reputation: 177
Beautiful Non-AA "crisp" Fonts in Slackware 12.2


I had planned on doing a updated version of my post "Beautiful fonts in slackware 12.1" but its looking like all the info and patches still apply to 12.2 so I don't think there is a need, but maybe...

However though I have been meaning to do a post on how to achieve the best traditional looking fonts since some people prefer the crispness of the way they look and do not like the "fuzzy" look sub-pixel rendering and anti aliasing can cause. Unlike sub-pixel rendering which can take sometime to properly setup, setting up traditional non-AA fonts is quite easy and can be done in about 10 minutes and I HIGHLY recommend doing this if you hvae a CRT.

DISCLAIMER!! The reason that the following information is not already built into Slackware or a lot of other distributions is because the technology used is patented by apple. By using it you should have permission by apple or live in a country where the patent doesn't apply, ok enough of that lets get started.

1) The first thing to do is we need to recompile the freetype package so that it will render fonts using the bytecode interpreter instead of the patent free autohinter that is used by default. Pat has already done all the work for us, his build script has all the patches and the bult script its self only requires changing one line to "turn on " the bytecode interpreter during compile. look for the following line and change it accordingly.

#zcat $CWD/freetype.bytecode.interpreter.diff.gz | patch -p1 --verbose || exit 1

change to

zcat $CWD/freetype.bytecode.interpreter.diff.gz | patch -p1 --verbose || exit 1

compile and upgrade the package and you are done with the first step. Also if you don't want to compile yourself feel free to use my package located here. http://webpages.charter.net/daedra/1...3.7-i486-2.tgz

2) You need to set your font DPI to the correct setting for your monitor or to what ever your preference is. Windows uses 96x96 be default and I think that is a good standard for CRT monitors but if you want change it to something different or get more technical about this go to this post its more detailed than anything I am prepared to write http://www.linuxquestions.org/questi...s-in-x-462034/. However if you have a nvidia card and are using there drivers they should automatically set your DPI for you, I don't know why this works it just does. To check your DPI in a terminal type xdpyinfo | grep resolution

3) Now that you have the freetype package setup and your DPI set properly the next step is to get some high quality fonts. In order for the bytecode interpreter to work it need fonts with bytecode information to "interpret". This is debatable but the windows core fonts, at least to me, are the best suited for this and should be used. To get the windows core fonts can copy them from your windows partition if you are dual booting or you can get them from alien bob's website at http://www.slackware.com/~alien/slackbuilds/corefonts/. the easiest way to make the fonts available after you get them is to copy the fonts to /usr/X11R6/lib/X11/fonts/TTF then run fc-cache and you should be good to go. You may have to restart X but I don't think you need to.

4) The last step is setting the fonts in various applications. To make firefox look like it does in windows you need to go to preferences/content/advanced and set your fonts to look like this http://webpages.charter.net/daedra/12.1/firefox.png now that firefox is setup you need to change the fonts for all kde apps, to do this open control center, go to the fonts section and you can change the fonts accordingly to your own preferences just so long as your using any microsoft core font you should get great results. also under the advanced tab you can tweak the settings, I personally turned on anti-aliasing for any fonts over 11pt in size, here is a screenshot of my settings http://webpages.charter.net/daedra/12.2/settings.jpg. Now we need to set the gtk default font to a windows core font, to do this fire up kedit and add this line gtk-font-name = "Arial 10" save the file in your home directory naming it .gtkrc-2.0 and your done. Keep in mind it doesn't have to be Arial thats just what I use.

Well if you have done everything correctly you should be all finished here are some screenshots to see what you can except the fonts to look like.

http://webpages.charter.net/daedra/12.2/noaalinux.jpg
http://webpages.charter.net/daedra/12.2/noaalinux2.jpg
http://webpages.charter.net/daedra/12.2/noaalinux3.jpg

here are the same screens in windows

http://webpages.charter.net/daedra/12.2/noaawin.JPG
http://webpages.charter.net/daedra/12.2/noaawin2.JPG


P.S. If I missed anything or if anyone has any hints or tweaks for better results please let us know.
 
Old 12-13-2008, 01:30 PM   #2
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
I have a question. Is it worth it to do this if you don't want to use Window$ fonts ? I personally have no need for Window$ fonts like Times New Roman (a font I hate, mostly because it's so boring and they forced me to use it for so long, I hate it now !). Will this help with say DejaVuSans ?
 
Old 12-13-2008, 01:33 PM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,223

Original Poster
Rep: Reputation: 177Reputation: 177
liberation and deja-vu seem to be good fonts and I did use those when I first set it up and yes I still was pleased with the results, but I still say that Windows core fonts give better results. But yes I think its still an improvement.
 
Old 12-13-2008, 05:48 PM   #4
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 509

Rep: Reputation: 41
I agree - it's absolutely worthwhile either way - it really makes a huge difference - at least for my visual taste.

I recommend against saving stuff into the .gtkrc-2.0 because that's the default gtkrc-file (theme/gnome/font) frontends to write (and overwrite!) into - do a .gtkrc.mine and include it into .gtkrc-2.0 - frontends and apps will leave this line untouched:

include "/home/whoeveryouare/.gtkrc.mine"

And if you need settings for gtk-apps alone, you can tweak all font stuff which we usally do in fonts.conf in your .gtkrc.mine like so:

gtk-font-name="Bitstream Vera Sans 8"
gtk-xft-antialias=1/0
gtk-xft-dpi=98304

hinting/subpixel stuff:

gtk-xft-hinting=1/0
gtk-xft-hintstyle=full/medium
gtk-xft-rgba=rgb/other

and so on.

Firefox' font details can be overwritten again with specific options to Firefox in your userContent.css and userChrome.css in Firefox' chrome-dir.

(Reminder: Firefox follows GTK themes beginning with version 3.)
 
Old 12-13-2008, 06:18 PM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,223

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by Su-Shee View Post
I agree - it's absolutely worthwhile either way - it really makes a huge difference - at least for my visual taste.

I recommend against saving stuff into the .gtkrc-2.0 because that's the default gtkrc-file (theme/gnome/font) frontends to write (and overwrite!) into - do a .gtkrc.mine and include it into .gtkrc-2.0 - frontends and apps will leave this line untouched:

include "/home/whoeveryouare/.gtkrc.mine"

And if you need settings for gtk-apps alone, you can tweak all font stuff which we usally do in fonts.conf in your .gtkrc.mine like so:

gtk-font-name="Bitstream Vera Sans 8"
gtk-xft-antialias=1/0
gtk-xft-dpi=98304

hinting/subpixel stuff:

gtk-xft-hinting=1/0
gtk-xft-hintstyle=full/medium
gtk-xft-rgba=rgb/other

and so on.

Firefox' font details can be overwritten again with specific options to Firefox in your userContent.css and userChrome.css in Firefox' chrome-dir.

(Reminder: Firefox follows GTK themes beginning with version 3.)
Nice, I didn't know that.
 
Old 12-14-2008, 03:20 AM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Alright, thanks, I'll try this later today.
 
Old 12-14-2008, 07:20 AM   #7
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by Daedra View Post
Well if you have done everything correctly you should be all finished here are some screenshots to see what you can except the fonts to look like.

http://webpages.charter.net/daedra/12.2/noaalinux.jpg
http://webpages.charter.net/daedra/12.2/noaalinux2.jpg
http://webpages.charter.net/daedra/12.2/noaalinux3.jpg

here are the same screens in windows

http://webpages.charter.net/daedra/12.2/noaawin.JPG
http://webpages.charter.net/daedra/12.2/noaawin2.JPG


P.S. If I missed anything or if anyone has any hints or tweaks for better results please let us know.
I don't get it. What is the problem with default font rendering?(example #1, example #2 12.1 screenshots) Could you point out the differences/improvements?
 
Old 12-14-2008, 10:19 AM   #8
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
Are you still advising that changes are made to cairo and libXFT?

Do you have 12.2 packages for these?

Thanks
 
Old 12-14-2008, 12:19 PM   #9
todders
Member
 
Registered: Nov 2006
Location: watford
Distribution: Slackware 13 64Bit Multi-Lib KDE4.2.4
Posts: 83

Rep: Reputation: 18
the cairo and libxft patches make the best difference when run with an lcd monitor and you prefer fuzzier looking sub-pixel rendering and anti aliasing.
 
Old 12-14-2008, 12:56 PM   #10
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,209

Rep: Reputation: 55
Yes I know my question is a little off-topic but I am using an LCD with anti-aliasing
 
Old 12-14-2008, 01:17 PM   #11
comm2k
LQ Newbie
 
Registered: Jul 2008
Posts: 28

Rep: Reputation: 16
Quote:
Originally Posted by ErV View Post
I don't get it. What is the problem with default font rendering?(example #1, example #2 12.1 screenshots) Could you point out the differences/improvements?
Some people prefer crisp non-anti-aliased fonts. Matter of taste. And the Windows version still looks better to me.

Example#2 is obvious - just look at the weird scaling that is all over the place - makes me crazy.

Shots from OP:
Look at the 'y' in the Linux-noAA and Windows-noAA version. Also a lot of words are crammed together and it just looks like garbage (s. 'if-you-give-it-away' on the slashdot screenshots).
 
Old 12-14-2008, 01:26 PM   #12
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,223

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by arubin View Post
Are you still advising that changes are made to cairo and libXFT?

Do you have 12.2 packages for these?

Thanks
No, like Todders said you only need to do that if you want sub-pixel rendering. All that is required here is recompiling freetype which I already did if you want to use my package, the link is in the first paragraph.

Last edited by Daedra; 12-14-2008 at 01:29 PM.
 
Old 12-14-2008, 01:37 PM   #13
todders
Member
 
Registered: Nov 2006
Location: watford
Distribution: Slackware 13 64Bit Multi-Lib KDE4.2.4
Posts: 83

Rep: Reputation: 18
In the end everything regarding font display is subjective and will be different with everyone,you will have to play around with all the options until you find one thats suits you.I personally just love the display on my lcd by enabling zcat $CWD/freetype.bytecode.interpreter.diff.gz | patch -p1 --verbose || exit 1 from the slackbuild file.

I think the display quality with microsoft fonts has gone up a notch with the 2.3.7 release of freetype,my fonts have never looked better.
 
Old 12-14-2008, 07:33 PM   #14
SqdnGuns
Member
 
Registered: Aug 2005
Location: Fountain Valley, CA / Thailand
Distribution: Slackware64 14.0
Posts: 981

Rep: Reputation: 88
Just want to add this:

I use Xfce and for the hell of it I figured I'd try Robby's xfce-r28979-i486-1_rlw.tgz from http://xfce46.rlworkman.net

Before upgrading, my fonts were just a bit jagged even when I had enabled AA, full hinting and set the DPI to 96. Now they are perfect!!
 
Old 12-14-2008, 10:53 PM   #15
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by comm2k View Post
Example#2 is obvious - just look at the weird scaling that is all over the place - makes me crazy.
Where it is exactly? Are you sure you zoomed in the picture to 100% (1280x1024)?
 
  


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
Beautiful fonts in Slackware 12.1 mattydee Slackware 1 12-11-2008 04:24 PM
Beautiful Fonts In Slackware. Daedra Slackware 39 12-02-2008 07:20 PM
Spam letters from "beautiful girl"... what is the point of this? ErV General 20 11-14-2008 12:12 PM
X: video drivers "ati" and "fglrx" show same fonts differently simopal6 Linux - Software 7 07-30-2008 02:36 AM
Slackware 9, full install, gnome won't start because system "can't find fonts" sketelsen Slackware 2 08-01-2003 10:14 AM


All times are GMT -5. The time now is 12:55 AM.

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