# subpixel hinting and font smoothing



## hadrons123 (Dec 30, 2011)

I have been using linux for more than a year and reached freebsd FreeBSD 9.0-RC3 from ubuntu>fedora>archlinux>FreeBSD.

I am a fan of subpixel hinting and font smoothing and since I was able to have that in all of the linux I have tried, I wish I had it before I completely moved to freebsd FreeBSD. I have been using freebsd FreeBSD for the last two months but not able to get the font smoothness as that of linux. I do realize it's not unachievable, because I have seen it on this website
http://freebsd.kde.org/img/screenshots/en_andyfawcett_kde410-1.png which is very similar to what I currently have in archlinux.

What I have tried until now:


 followed this guide, but still it's not good enough and not up to the level of arch linux http://forums.freebsd.org/showthread.php?t=2021&highlight=fontconfig

 tried creating a .fonts.conf file in my user folder (both as user and root accounts) and copied the arch linux fonts.conf but it's not satisfactory either. Maybe the font conf for arch and FreeBSD differ so much.
It's not like I revel in eyecandy, but obviously after some time working in freebsd FreeBSD it strains my eyes because of the fonts.


----------



## aragon (Dec 30, 2011)

Maybe you just need to install the right set of fonts?  Personally I'm happy with x11-fonts/webfonts and x11-fonts/liberation-fonts-ttf.


----------



## oops (Dec 30, 2011)

Try https://github.com/paranormal/freebsd_fonts_ubuntu


----------



## hadrons123 (Dec 31, 2011)

I figured out something in the meantime from the mailing list and had a setup.

Reply to aragon:

I tried your step already. Not much of a difference. I have already installed webfonts, URW, truetype, loaded truetype in xorg.conf.

Reply to oops:

Your link is good. First my system failed to build cairo with the patch, but I tried again and then it worked. I followed the README with all the steps and at the end of installation of all the files in the github I lost my original configuration and the whole system looked instantly ugly but on restarting the system everything (all the system fonts like Gnome panels, nautilus) looked fine, except for Firefox where the font rendering is still not very great. It is ok, but I can certainly tell the difference. I have a default 'serif' font on my Firefox preferences.

Anything else I can to do?


----------



## vinkler (Dec 31, 2011)

You can even test this:
http://www.sergeysl.ru/freebsd-fonts/


----------



## darcsis (Jan 1, 2012)

FreeBSD uses the same font configuration as linux does. There are, maybe, 4 or 5 layers of configuration that matter.

1. /usr/local/etc/fonts/fonts.conf default system level configuration
2. /usr/local/etc/fonts/local.conf default system level configuration that overrides defaults.(this file may not exist. You can create it)
3. $HOME/.fonts.conf user level configuration that overrides the configurations above.
4. some desktop environment uses its own font configuration that will override the configurations above. e.g. GNOME's gnome-settings-daemon.
5. $HOME/.Xresources may contain Xft fonts settings that apply to Xft fonts.


----------



## rianav (Jan 2, 2012)

Hello,
Can this help you? 
http://www.infinality.net/blog/infinality-freetype-patches/

Cheers.


----------



## hadrons123 (Jan 2, 2012)

I thought about infinality but now I already made a switch to GhostBSD. (until I get a grip on the USB files mounting, fontconfigs etc).

So, people, thanks for the help. I will be back to FreeBSD, soon.


----------



## hadrons123 (Jan 4, 2012)

darcsis said:
			
		

> FreeBSD uses the same font configuration as linux does. There are, maybe, 4 or 5 layers of configuration that matter.
> 
> 
> 4. some desktop environment uses its own font configuration that will override the configurations above. e.g. GNOME's gnome-settings-daemon.
> 5. $HOME/.Xresources may contain Xft fonts settings that apply to Xft fonts.



I am back to FreeBSD now.

1. How does gnome control the font settings; if it does where is it?

2. I don't know how to set up infinality in FreeBSD. I downloaded the sources. But I had to learn that infinality is designed to work with Linux, specifically fedora.


----------



## hadrons123 (Jan 12, 2012)

oops said:
			
		

> Try https://github.com/paranormal/freebsd_fonts_ubuntu


It worked. Now the fonts look very similar to ubuntu font rendering type. Thank you oops!
I did a fresh install of FreeBSD 9.0 , downloaded the above git package. Followed the README file. Deinstalled cairo, freetype2, fontconfig, libxft. Copied the zip file contents to the respective folders as instructed. Did a *make WITH_LCD_FILTERING=yes* for freetype2. All the other deinstalled packages were installed from the ports.

Following that I  created a .fonts.conf file in my user home folder. Pasted this XML contents into the file


```
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</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>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>
```
I would like to thank arch linux wiki for this. fonts.conf.


----------



## vinkler (Jan 12, 2012)

I wonder what effect?
You can ask for a screen?
My now looks like this:


----------

