LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Beautiful Non-AA "crisp" Fonts in Slackware 12.2 (https://www.linuxquestions.org/questions/slackware-14/beautiful-non-aa-crisp-fonts-in-slackware-12-2-a-690357/)

Daedra 12-13-2008 12:57 PM

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.

H_TeXMeX_H 12-13-2008 01:30 PM

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 ?

Daedra 12-13-2008 01:33 PM

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.

Su-Shee 12-13-2008 05:48 PM

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.)

Daedra 12-13-2008 06:18 PM

Quote:

Originally Posted by Su-Shee (Post 3374528)
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.

H_TeXMeX_H 12-14-2008 03:20 AM

Alright, thanks, I'll try this later today.

ErV 12-14-2008 07:20 AM

Quote:

Originally Posted by Daedra (Post 3374331)
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?

arubin 12-14-2008 10:19 AM

Are you still advising that changes are made to cairo and libXFT?

Do you have 12.2 packages for these?

Thanks

todders 12-14-2008 12:19 PM

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.

arubin 12-14-2008 12:56 PM

Yes I know my question is a little off-topic but I am using an LCD with anti-aliasing

comm2k 12-14-2008 01:17 PM

Quote:

Originally Posted by ErV (Post 3375034)
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).

Daedra 12-14-2008 01:26 PM

Quote:

Originally Posted by arubin (Post 3375164)
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.

todders 12-14-2008 01:37 PM

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.

SqdnGuns 12-14-2008 07:33 PM

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

ErV 12-14-2008 10:53 PM

Quote:

Originally Posted by comm2k (Post 3375305)
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)?


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