Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
the perfect antialias - a ms cleartweak clone
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
paranoidx
n00b
n00b


Joined: 11 Aug 2006
Posts: 7
Location: the deep

PostPosted: Mon Oct 16, 2006 5:16 am    Post subject: the perfect antialias - a ms cleartweak clone Reply with quote

Firstly, I am pretty new to gentoo so cosmetics is pretty important since I migrated from MS win. Over the past months after compiling and compiling and reading tonnes of notes/faq. I finally got gentoo to function like my lap dog(exaggerated ofcoarse), damn toughie despite my background. (phew!!)

But the anti-alias display and font collection, thats another department altogether. After reading http://gentoo-wiki.com/HOWTO_Xorg_and_Fonts I
gathered approx how the X windows and aa works in X and thanks to that wiki it gave me a good insight into the fundamentals.

After following the wiki, well let me say it was still far from what I am used to from ms win. Fonts/display although trivial, it is the biggest part of the ball game in
attracting new comers. This is not only as my opinions but also opinions of many others that I've read from blogs etc.

As a gentoo(linux as well) lover myself now due to countless advantages. I really want to fully migrate to a 100% nix environment with all my other boxes and good ridance with the ms box. Font display was to my surprise, the biggest stumbling block. The first reaction from everyone I tried introduced nix to, the first question is: why is the font ........

But I have finally get it to look like ClearType(R) instead of a fuzzy faded blurred blob. But there's a catch, at least until I have the time to read more about the fontconfig custimization or people here to enlighten me. All the ms fonts I imported displayed perfectly, but all the linux fonts inclusive of bitstream, lucida etc turns out to be blocky.

Italics also don't display properly but not too bad. Since my main use is xterm/bash/browsers, this don't affect me at all. But I will look further into it to customized the perfect AA display.

Any comments, recommendation is welcome, as I am a beginner myself.

heres the screenies:
antialias - hint, no sub-pixel
[IMG]http://img181.imageshack.us/img181/1497/aahintnosub1id5.png[/IMG]

antialias - nohint, no sub
[IMG]http://img148.imageshack.us/img148/4135/aanohintnosubxq8.png[/IMG]

antialias - no hint, with sub
[IMG]http://img91.imageshack.us/img91/3071/aanohintwithsubwj0.png[/IMG]

as you can see all of them is simply fuzzy, blurred etc. I have emerge freetype USE="-bindist".

heres my tuning to what I believe is the closest to windows cleartweak.
[IMG]http://img134.imageshack.us/img134/1237/aaperfecthd4.png[/IMG]

to achieve this:
-------------/etc/fonts/local.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure system font access -->
<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font">
<test qual="all" name="rgba"> <const>unknown</const> </test>
<edit name="rgba" mode="assign"><const>rgb</const></edit>
</match>
<!-- Use the Autohinter -->
<match target="font">
<edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!-- Disable Autohinting for bold fonts -->
<match target="font">
<test name="weight" compare="more"> <const>medium</const> </test>
<edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!-- Exclude/Include a range of fonts for Anti Aliasing -->
<match target="font">
<test qual="any" name="size" compare="more"> <double>9</double> </test>
<test qual="any" name="size" compare="less"> <double>14</double> </test>
<edit name="antialias" mode="assign"> <bool>false</bool> </edit>
</match>
<!-- And/Or disable Anti Aliasing for a range on pixel-based size.
Disabling this using both methods seems to fix Firefox. -->
<!--
<match target="font">
<test compare="less" name="pixelsize" qual="any"> <double>20</double> </test>
<edit mode="assign" name="antialias"> <bool>false</bool> </edit>
</match>
-->
</fontconfig>

----------.$HOME/.fonts.conf < not needed for kde but needed for
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
<bool>true</bool>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hintstyle" >
<const>hintfull</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="antialias" >
<bool>true</bool>
</edit>
</match>
</fontconfig>

-------------ONLY important parts of xorg.conf
Section "Device"
#VideoRam 524288
# Insert Clocks lines here if appropriate
# BusiD "PCI:1:0:0"
# VendorName "nVidia Corporation"
Identifier "GeForce 7900 GTX"
Driver "nvidia"
BoardName "NVIDIA"
Card "NVIDIA GeForce"
Option "NoLogo" "0"
Option "MetaModes" "1280x1024,1280x1024;"
Option "sw_cursor"
Option "EnablePageFlip" "true"
Option "BusType" "PCIE"
Option "AGPFastWrite" "true"
Option "EnableDepthMoves" "true"
Option "RenderAccel" "true"
Option "NvAGP" "0"
Option "UseDisplayDevice" "DFP-0"
Option "AllowGLXWithComposite" "true"
Option "UseEdidDpi" "true"
EndSection

in regards to the /etc/fonts/fonts.conf, I don't think I modified it, but I might be wrong. :D

Hope this helps out to promote nix and gentoo to others :)
Back to top
View user's profile Send private message
nbensa
l33t
l33t


Joined: 10 Jul 2002
Posts: 799
Location: Buenos Aires, Argentina

PostPosted: Mon Oct 16, 2006 5:41 am    Post subject: Re: the perfect antialias - a ms cleartweak clone Reply with quote

paranoidx wrote:

heres my tuning to what I believe is the closest to windows cleartweak.
[IMG]http://img134.imageshack.us/img134/1237/aaperfecthd4.png[/IMG]



That's exactly how KDE looks if you just turn off antialias. Am I missing something?
Back to top
View user's profile Send private message
paranoidx
n00b
n00b


Joined: 11 Aug 2006
Posts: 7
Location: the deep

PostPosted: Tue Oct 17, 2006 2:58 am    Post subject: Reply with quote

I have to have hinting on(slight or any other) with no antialias. If everything is off, well it looks like a goo of crooked lines on mine no matter what foundry/family font except bitmap fonts.

Another issue that I came accross with the KDE control centre is that by turning antialias off, the menu where sub-hinting etc is disabled. But you can always temporary enable the aa and then change the hinting then disable the aa. If you look at the $HOME/.font.conf now, you will notice the aa disabled but the hinting is on whatever you have set. So in a sense the kde control centre is misleading.

heres what I gathered so far in regards to how fontconfig works.
From the kde control centre, it seems that hinting/sub-pixel is part of antialias. Hence disabling aa, I can't modify hinting/sub. But according to my experiments, these 3 can be set independantly. So I can set hinting with no aa,sub-pixel or aa/sub with no hint etc.

After playing around with it a bit more I finally got every font to look exactly as how i wanted it.

the key is in the /etc/fonts/local.conf and a monitor is always(presumable) tied to the computer with the fonts, the best place to modify is local.conf which is a system wide setting.

Unless you have a CRT/LCD xinerama, then I have no idea which is the optimum or whether you can set 2 rules to the same fonts to 2 difference device.

but what I did is simply specify rules to the specific fonts. So within /etc/fonts/local.conf
this is the system wide setting:
Code:

<match target="font">
  <test qual="all" name="rgba"><const>unknown</const></test>
  <edit name="rgba" mode="assign"><const>vrgb</const></edit>
</match>

<match target="font">
  <edit mode="assign" name="antialias"><bool>true</bool></edit>
  <edit mode="assign" name="hinting"><bool>false</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintnone</const></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>


So the sub-hinting is always rgb
antialias = on
hinting = off
hintstyle = none
autohint = off (unless you emerge freetype with USE=bindist)

then further down to specfy specific rules to micosoft fonts:
Code:

<match target="font">
  <test name="foundry" compare="eq"><string>microsoft</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
  <edit name="rgba" mode="assign"><const>none</const></edit>
</match>

The way the local.conf is parsed is FIFO (first in first out) so if further down the conf I have say:
Code:

<match target="font">
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
</match>

then this will overide any previous modification. Since before "<edit mode" there is no "<test" before hand it will modify this properties no matter the circumstances. So the order in which you put it is very important. Therefore all the specific settings should be placed in the end of the file.

I also had difficult uniquely identifying the fonts. Since I am not familiar with nix naming system for fonts (damn crazy if you want my opinion). I had to browse the fonts.dir within the font and use xfontsel to assist me to nail down the foundry/family.

I attempted to use the '<test name="file"' as mention in the manual. but it didn't trap the incident. So I had to do with family/foundry. Maybe someone with better knowledge might shed light into how to uniquely identify font more easily.

heres the complete /etc/fonts/local.conf:
Code:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/local.conf file to configure system font access -->
<fontconfig>

<!-- Enable sub-pixel rendering -->
<match target="font">
  <test qual="all" name="rgba"><const>unknown</const></test>
  <edit name="rgba" mode="assign"><const>vrgb</const></edit>
</match>

<match target="font">
  <edit mode="assign" name="antialias"><bool>true</bool></edit>
  <edit mode="assign" name="hinting"><bool>false</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintnone</const></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>

<match target="font">
  <test name="foundry" compare="eq"><string>microsoft</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
  <edit name="rgba" mode="assign"><const>none</const></edit>
</match>

<match target="font">
  <test name="foundry" compare="eq"><string>monotype</string></test>
  <test name="family" compare="eq"><string>impact</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!-- lucida sans unicode -->
<match target="font">
  <test name="family" compare="contains"><string>lucida</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!-- palitino -->
<match target="font">
  <test name="family" compare="contains"><string>pala</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<match target="font">
  <test name="family" compare="eq"><string>arial</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!-- Enable mon... -->
<match target="font">
  <test name="family" compare="contains"><string>mon</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!-- Kochi -->
<match target="font">
  <test name="family" compare="contains"><string>kochi</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!--  -->
<match target="font">
  <test name="family" compare="contains"><string>franklin</string></test>
  <edit mode="assign" name="hinting"><bool>true</bool></edit>
  <edit mode="assign" name="hintstyle"><const>hintslight</const></edit>
  <edit mode="assign" name="antialias"><bool>false</bool></edit>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<!-- Disable Autohinting for bold fonts -->
<match target="font">
  <test name="weight" compare="more"><const>medium</const></test>
  <edit name="autohint" mode="assign"><bool>false</bool></edit>
</match>
<alias>
 <family>Times</family>
 <prefer>
 <family>Times New Roman</family>
 </prefer>
 <default>
 <family>serif</family>
 </default>
</alias>
<alias>
 <family>Helvetica</family>
 <prefer>
 <family>Arial</family>
 </prefer>
 <default>
 <family>sans</family>
 </default>
</alias>
<alias>
 <family>Courier</family>
 <prefer>
 <family>Courier New</family>
 </prefer>
 <default>
 <family>monospace</family>
 </default>
</alias>
<alias>
 <family>serif</family>
 <prefer>
 <family>Times New Roman</family>
 </prefer>
</alias>
<alias>
 <family>sans</family>
 <prefer>
 <family>Arial</family>
 </prefer>
</alias>
<alias>
 <family>monospace</family>
 <prefer>
 <family>Andale Mono</family>
 </prefer>
</alias>
<alias>
 <family>serif</family>
 <prefer>
 <family>Times New Roman</family>
 </prefer>
</alias>
</fontconfig>
Back to top
View user's profile Send private message
tallest
Tux's lil' helper
Tux's lil' helper


Joined: 09 Mar 2004
Posts: 145
Location: Socorro, NM, USA

PostPosted: Tue Oct 24, 2006 9:11 pm    Post subject: Reply with quote

So...

Your perfect antialias is no antialias???
_________________
Those who can make you believe in absurdities can make you commit atrocities. --Voltaire
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum