Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

About the LCD ClearType patch

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
sconosciuto
Posts: 5
Joined: 2011-02-19 13:46

Re: About the LCD ClearType patch

#76 Post by sconosciuto »

Yes, but you need libcairo2 1.10 from Debian unstable (I think).

eric1959
Posts: 1298
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: About the LCD ClearType patch

#77 Post by eric1959 »

I went to this page : http://crunchbanglinux.org/forums/topic ... ke-ubuntu/ and applied the patches ( libcairo2, libxft2 ). Fonts look sharper than what I first used, see http://forums.debian.net/viewtopic.php? ... 15#p347715

My own .fonts.conf :

Code: Select all

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
    <match target="font">
        <test name="family">
            <string>Candara</string>
            <string>Segoe</string>
            <string>Corbel</string>
            <string>Tahoma</string>
            <string>Verdana</string>
        </test>
        <edit mode="assign" name="autohint">
            <bool>true</bool>
        </edit>
    </match>
    <match target="font">
        <test compare="more" name="weight">
            <const>medium</const>
        </test>
        <edit mode="assign" name="autohint">
            <bool>false</bool>
        </edit>
    </match>
   <match target="font" >
         <edit name="embeddedbitmap" mode="assign">
             <bool>false</bool>
         </edit>
    </match>
    <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>hintfull</const>
        </edit>
    </match>
    <match target="font">
        <edit mode="assign" name="antialias">
            <bool>true</bool>
        </edit>
    </match>
    <!-- lcdnone, lcddefault, lcdlight, lcdlegacy -->
<match>
    <edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
    <edit name="dpi" mode="assign"><double>101</double></edit>
    </match>
    <dir>~/.fonts</dir>
    </fontconfig>
Debian Bits And Snips
Squeeze, Gnome, amd64, Intel Core i3-530, Geforce GT330

User avatar
andreas_1
Posts: 43
Joined: 2009-11-29 08:40
Location: Vienna

Re: About the LCD ClearType patch

#78 Post by andreas_1 »

i finally have nice fonts in gtk applications, here's how:

1. i run testing, my libcairo2 version is 1.10, which is already patched, so nothing to do here
2. i made the following changes to my ~/.fonts.conf:


<?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>hintmedium</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>


with this, my kde and gtk fonts look exactly the same (as in, the gimp layer diff is a black square), see screenshots below. these changes are not to be confused with different hinting styles, which are more a matter of personal preference (kde uses hintmedium, gnome uses hintslight by default).

screenshot order is: iceweasel before (gtk|gnome default), iceweasel after (gtk|gnome fixed), konqueror (qt|kde)

Image
Image
Image

User avatar
Hadret
Posts: 354
Joined: 2007-07-19 13:04
Location: Berlin

Re: About the LCD ClearType patch

#79 Post by Hadret »

@andreas_1 thanks for posting this -- worked for me too (:

eric1959
Posts: 1298
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: About the LCD ClearType patch

#80 Post by eric1959 »

Code: Select all

$apt-show-versions -a libcairo2
libcairo2 1.10.2-6.1 install ok installed
libcairo2 1.8.10-6           squeeze           ftp.nluug.nl
libcairo2 1.10.2-1.1~bpo60+1 squeeze-backports mozilla.debian.net
libcairo2 1.10.2-6.1         unstable          hadret.rootnode.net
libcairo2/unstable uptodate 1.10.2-6.1
After some upgrades you don't need to patch libcairo2 anymore ( like I told before http://debian-bits-and-snips.blogspot.c ... ilter.html ).

But these lines are essential :

Code: Select all

<!-- lcdnone, lcddefault, lcdlight, lcdlegacy -->
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
See : http://debian-bits-and-snips.blogspot.c ... ueeze.html
Debian Bits And Snips
Squeeze, Gnome, amd64, Intel Core i3-530, Geforce GT330

User avatar
praka123
Posts: 195
Joined: 2007-06-23 08:11
Location: Muvattupuzha,India
Has thanked: 2 times

Regarding "Infiniality"

#81 Post by praka123 »

I saw this while browsing for fixing fonts in Iceweasel. Does these packages "Infinality" provides are superior to the cleartype and font anti aliasing We achieve in Debian. Any thoughts? (EDIT: I have font anti aliasing working "good".not a query I'm asking.)
They have provided patches and fonts.conf tweaking:
http://www.infinality.net/blog/?category_name=fonts
Subpixel Hinting and Other Enhancements for Freetype & Fedora 13, 14, Rawhide RPM Packages
Filed Under: Fonts, Linux by Infinality — 106 Comments
November 17, 2010

Simply speaking, this patch makes Freetype's (http://www.freetype.org) Truetype interpreter perform Truetype hinting instructions in the Y direction only, and skip the X direction. This produces a nice visual result at smaller resolution, like those typical at sizes commonly used on the computer screen. This patch is not perfect, and needs some work on certain fonts, however, in my opinion it renders much, much better than the native truetype hinting contained in legacy fonts.

The truetype instructions in legacy fonts were designed with the idea of bi-level (monochrome) hinting in mind, not subpixel (antialiased) hinting. To make these fonts display nicely in the subpixel world, the MS TT interpreter in Windows XP and later works around this by ignoring certain Truetype instructions contained in the font (probably among other things). This patch attempts to duplicate that functionality. Modern free fonts like Liberation and DejaVu also look good with this too, because they were designed with subpixel hinting in mind.

Another benefit to this is that it is modifying the default (native) hinter of Freetype, which all programs would use by default (if not overridden by other fontconfig settings). This means that oo.org, WINE, Xft, Qt and just about everything else will be using this by default, and rendering fonts the same good way.

There are a few patches I'm providing here, and Fedora packages that implement them. Also, in case it isn't clear yet,
http://www.infinality.net/blog/?p=67

OT: They got a nice font "Testing" page here:
http://www.infinality.net/files/font.html
Debian (Testing/Unstable)

eric1959
Posts: 1298
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: About the LCD ClearType patch

#82 Post by eric1959 »

I was about to ask the same....So the question remains : did someone apply these patches ( libfreetype6 ) from http://www.infinality.net/blog/ ..?

I remember a former post : http://forums.debian.net/viewtopic.php? ... 73#p336078 where these packages were created ( only 32 bit though, so I can't use them ).
Debian Bits And Snips
Squeeze, Gnome, amd64, Intel Core i3-530, Geforce GT330

User avatar
praka123
Posts: 195
Joined: 2007-06-23 08:11
Location: Muvattupuzha,India
Has thanked: 2 times

Re: About the LCD ClearType patch

#83 Post by praka123 »

@eric1959: there is a ppa with "infinality" patched cairo and freetype libraries for Ubuntu here:
https://launchpad.net/~no1wantdthisname/+archive/ppa

Perhaps, as a better Idea, build packages for Debian from the (Patched)source cairo,freetype libs packages He has provided in the repository.
Debian (Testing/Unstable)

eric1959
Posts: 1298
Joined: 2008-12-15 13:17
Location: Amsterdam

Re: About the LCD ClearType patch

#84 Post by eric1959 »

praka123 wrote:@eric1959: there is a ppa with "infinality" patched cairo and freetype libraries for Ubuntu here:
https://launchpad.net/~no1wantdthisname/+archive/ppa

Perhaps, as a better Idea, build packages for Debian from the (Patched)source cairo,freetype libs packages He has provided in the repository.
Thanks, I'll have a look....
Debian Bits And Snips
Squeeze, Gnome, amd64, Intel Core i3-530, Geforce GT330

User avatar
nomko
Posts: 431
Joined: 2010-12-10 07:01
Location: Den Haag, The Netherlands

Re: About the LCD ClearType patch

#85 Post by nomko »

eric1959 wrote:
praka123 wrote:@eric1959: there is a ppa with "infinality" patched cairo and freetype libraries for Ubuntu here:
https://launchpad.net/~no1wantdthisname/+archive/ppa

Perhaps, as a better Idea, build packages for Debian from the (Patched)source cairo,freetype libs packages He has provided in the repository.
Thanks, I'll have a look....
It's a Ubuntu specific PPA. Usable for Debian or not??
- - - - - - - - - - - - - - - - - - - - - - - - -
http://sites.google.com/site/debianlinu ... gssysteem/
- - - - - - - - - - - - - - - - - - - - - - - - -
Do not send me private messages, they will be deleted without reading

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: About the LCD ClearType patch

#86 Post by bugsbunny »

nomko wrote:
eric1959 wrote:
praka123 wrote:@eric1959: there is a ppa with "infinality" patched cairo and freetype libraries for Ubuntu here:
https://launchpad.net/~no1wantdthisname/+archive/ppa

Perhaps, as a better Idea, build packages for Debian from the (Patched)source cairo,freetype libs packages He has provided in the repository.
Thanks, I'll have a look....
It's a Ubuntu specific PPA. Usable for Debian or not??
As was stated:

as a better Idea, build packages for Debian from the (Patched)source cairo,freetype libs packages He has provided in the repository.

Change!
Posts: 4
Joined: 2010-12-30 20:35

Re: About the LCD ClearType patch

#87 Post by Change! »

Hi everyone,


I am running squeeze and recently installed Iceweasel 4.0 from the instructions on http://mozilla.debian.net/
The system upgraded libcairo2 to version 1.10-2.1.1 and the fonts became sharp.

So I created a .fonts.conf file and copied paste the content from andreas_1

Code: Select all

<?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>hintmedium</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>
The fonts look better for most apps but they still look default and ugly for Openoffice and Synaptic manager (and possibly other apps not yet checked).

Does anyone know how to fix this so that Openoffice and Synaptic can have the same font rendering has every other apps?

Thanks.

kiyoshi-kun
Posts: 1
Joined: 2011-06-18 03:37

Re: About the LCD ClearType patch

#88 Post by kiyoshi-kun »

Change! wrote: Does anyone know how to fix this so that Openoffice and Synaptic can have the same font rendering has every other apps?
Create .Xdefaults file with next content in your home dir:

Code: Select all

Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintmedium
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb
For system-wide effect add above code in /etc/X11/Xresources/x11-common

Change!
Posts: 4
Joined: 2010-12-30 20:35

Re: About the LCD ClearType patch

#89 Post by Change! »

Thanks, kiyoshi-kun! :)

I followed your instructions and it worked just fine, everything looks good now!

PaulRufous
Posts: 2
Joined: 2010-11-04 09:07

Re: About the LCD ClearType patch

#90 Post by PaulRufous »

default .fonts.conf is /etc/fonts/fonts.conf?
http://paste.debian.net/121899/

Post Reply