PDA

View Full Version : improved font-rendering for FC6


MacSlow
2007-01-07, 10:27 PM CST
Greetings everybody!

I've been enjoying the specially patched versions of cairo, libXft and freetype under Ubuntu 6.10 for some time now and wanted the same crisp font-rendering on my laptop, which happens to run Fedora Core 6. I looked high and low for patched versions of those packages to install on FC6, but could not find them. Thus I created them myself.

I grabbed the needed patches (initially written by David Turner, freetype-maintainer) from the web and inserted them in the stock SRPMs from the FC6 repositories. The resulting binary RPMs and the new SRPMs I tar'ed up and placed them...

here (http://macslow.thepimp.net/projects/improved-fonts-for-fc6.tar.bz2) (sha1-checksum (http://macslow.thepimp.net/projects/improved-fonts-for-fc6.tar.bz2.sha1sum) of the tarball).

Here's a rough guide how to get this installed on your system. A word of caution: if you belong to the type of person, that does not like to install non-official packages and all possible problems that might arise from this, stop reading now! I will not be held responsible, if you mess up your system following this small guide here. I just provide it for convenience to interested people, who would like improved font-rendering on their FC6-systems.

I got rid of the unpatched packages doing these steps...

1.) logout of gnome
2.) switch to a VT
3.) log in as root
4.) issue the command: telinit 3
5.) wait a few seconds for this to finish
6.) issue the command: rpm -e --nodeps cairo cairo-devel freetype freetype-devel libXft libXft-devel

... then you would need to proceeded like this...

7.) unpack the tarball: tar jxvf improved-fonts-for-fc6.tar.bz2
8.) cd improved-fonts-for-fc6
9.) rpm -ivh *.i386.rpm
10.) cd .. ; rm -rf improved-fonts-for-fc6
11.) telinit 5 ; exit
12.) relogin to gnome as a normal user

If you don't trust my binary RPMs just take a look at the supplied SRPMs to see what's going on. Finally here's a screenshot of what you can expect in terms of font-rendering-quality (don't be confused by the Ubuntu-ish look, I use a theme that does provide these looks, it's still a FC6-system). Don't forget that you need to enable subpixel-anti-aliasing in Gnome's font-properties for this to take effect (after you installed/replaced the RPMs). I'm using light hinting btw. And remember to set the correct values for option DisplaySize in your /etc/X11/xorg.conf in the Monitor-section, thus you can get a proper DPI-info from the command:

xdpyinfo | grep resolution

Use the reported value in the DPI-settings of gnome-font-properties.

http://macslow.thepimp.net/shots/small_improved-fonts-for-fc6.png (http://macslow.thepimp.net/shots/improved-fonts-for-fc6.png)

Best regards...

MacSlow

daneel971
2007-01-07, 11:58 PM CST
Thanks for your effort. I'm going to try it tonight. :)

Wayne
2007-01-08, 12:06 AM CST
When I tried Ubuntu 6.06 when it was released I used the original fixes mentioned, which did improve the rendering of western fonts but the DBCS fonts were horrible with and without. I'd like to give this a go but I'm afraid to mess up my nice Japanese fonts in FC6 :D

I was sitting here scratching my head wondering where I'd seen the nick MacSlow before, it wasn't till I saw your other post on Cairo-Clock that I remembered. Getting thick in my old age. :eek:

Cheers

Wayne

leigh123@linux
2007-01-08, 12:50 AM CST
When I tried Ubuntu 6.06 when it was released I used the original fixes mentioned, which did improve the rendering of western fonts but the DBCS fonts were horrible with and without. I'd like to give this a go but I'm afraid to mess up my nice Japanese fonts in FC6 :D

I was sitting here scratching my head wondering where I'd seen the nick MacSlow before, it wasn't till I saw your other post on Cairo-Clock that I remembered. Getting thick in my old age. :eek:

Cheers

Wayne

check to see if your fonts return a square number i.e 75x75 96x96 & not 96x94

http://www.ubuntuforums.org/showthread.php?t=20976

xdpyinfo | grep dimensions
xdpyinfo | grep resolution

Wayne
2007-01-08, 12:55 AM CST
check to see if your fonts return a square number i.e 75x75 96x96 & not 96x94

http://www.ubuntuforums.org/showthread.php?t=20976

You posted the same message twice. You posted the same message twice. :D

That's the howto I used when I tried Ubuntu. I'm pretty satisfied with the rendering in FC6, especially DBCS. Although I do get this:

resolution: 85x86 dots per inch

I may try it at 96x96

Wayne

leigh123@linux
2007-01-08, 12:59 AM CST
You posted the same message twice. You posted the same message twice. :D

That's the howto I used when I tried Ubuntu. I'm pretty satisfied with the rendering in FC6, especially DBCS. Although I do get this:

resolution: 85x86 dots per inch

I may try it at 96x96

Wayne

Thanks, other post deleted

85x86 dots per inch


A difference of 1 is enough to notice!

PeTzZz
2007-01-08, 08:49 AM CST
Moved to How-To Articles.

beissemj
2007-01-09, 01:32 AM CST
Works great here. Although, i changed my ~/.fonts.conf (to help firefox out a bit...)


<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<test compare="more" name="pixelsize" qual="any">
<double>12</double>
</test>
<edit name="autohint" mode="assign" >
<bool>true</bool>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Bitstream Vera Sans</string>
</test>
<edit name="family" mode="assign">
<string>Arial</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Helvetica</string>
</test>
<edit name="family" mode="assign">
<string>Arial</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Palatino</string>
</test>
<edit name="family" mode="assign">
<string>Georgia</string>
</edit>
</match>
</fontconfig>


tar jxcvf improved-fonts-for-fc6.tar.bz2
I think you may have meant
tar -xvjpf improved-fonts-for-fc6.tar.bz2

Also, setting 96dpi for my xorg.conf was also helpful.

Section "Monitor"
Identifier "Monitor0"
ModelName "LCD Panel 1400x1050"
### Comment all HorizSync and VertSync values to use DDC:
HorizSync 31.5 - 90.0
VertRefresh 59.0 - 75.0
Option "dpms"

# DisplaySize 270 203 # 1024x768 96dpi
# DisplaySize 338 254 # 1280x960 96dpi
# DisplaySize 338 270 # 1280x1024 96dpi
DisplaySize 370 277 # 1400x1050 96dpi
# DisplaySize 423 370 # 1600x1400 96dpi
EndSection

BTW: I found sub-pixel smoothing to best the best "hinting" option for me.

Finalzone
2007-01-09, 01:52 AM CST
9.) rpm -ivh *.i386.rpm



yum localinstall will do the trick too in case of dependencies rpm cannot solve.