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
User avatar
Hadret
Posts: 354
Joined: 2007-07-19 13:04
Location: Berlin

Re: About the LCD ClearType patch

#31 Post by Hadret »

There are new versions of cairo packages in Debian unstable repositories - 1.8.8-2. I've already applied patch and uploaded new version (1.8.8-2.1) on server. Packages for AMD64 are here: http://debian.hadret.com/

Enjoy! (:

[EDITED]

There are new versions of freetype packages in Debian unstable repositories as well - 2.3.9-5. Patched packages - 2.3.9-5.1 - are already on my server.

User avatar
EDzior
Posts: 19
Joined: 2007-10-28 11:17

Re: About the LCD ClearType patch

#32 Post by EDzior »

Packages with David Turner's patches for i386 architecture can be found here:
http://sites.google.com/site/emikaadeo/home/packages
Debian testing/unstable + KDE4

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

Re: About the LCD ClearType patch

#33 Post by Hadret »

There are some new packages versions. I've already checked freetype and my conclusion is -- there's no longer need to patch this package. Here's why: David Turner's patch for freetype changes one file ../src/autofit/aflatin.c, here is patch:

Code: Select all

      *  We snap the width of vertical stems for the monochrome and
      *  horizontal LCD rendering targets only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
 
     /*
      *  We snap the width of horizontal stems for the monochrome and
      *  vertical LCD rendering targets only.
      */
-    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
+    if ( mode == FT_RENDER_MODE_MONO )
       other_flags |= AF_LATIN_HINTS_VERT_SNAP;
 
     /*
As you may see, it doesn't change very much. What's more important in version 2.3.11 of freetype, those lines look like this:

Code: Select all

     *  We snap the width of vertical stems for the monochrome and
     *  horizontal LCD rendering targets only.
     */
    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
      other_flags |= AF_LATIN_HINTS_HORZ_SNAP;

    /*
     *  We snap the width of horizontal stems for the monochrome and
     *  vertical LCD rendering targets only.
     */
    if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
      other_flags |= AF_LATIN_HINTS_VERT_SNAP;

    /*
The only change is to make "mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD" look like "mode == FT_RENDER_MODE_MONO" and "mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V" look like "mode == FT_RENDER_MODE_MONO", that's all. For me fonts with this package from official Debian repository still look fine, just as if patch was applied.

I must check if patches for xft are needed, but I may guess they are not. I've got 2.1.14 version of libxft2 on my system without David Turner's patches and fonts still look fine. The only package on my system at the moment that is patched is cairo (libcairo2 1.8.8 ). I didn't checked yet if version from experimental repository (1.9.4) need David Turner's patch or not. It would be great if not. Debian would have very nice looking fonts out of the box. I'll let you know when I check xft patch and try out cairo package from experimental repository (:

ganquan
Posts: 5
Joined: 2007-08-22 03:25

Re: About the LCD ClearType patch

#34 Post by ganquan »

Hadret wrote:There are new versions of cairo packages in Debian unstable repositories - 1.8.8-2. I've already applied patch and uploaded new version (1.8.8-2.1) on server. Packages for AMD64 are here: http://debian.hadret.com/

Enjoy! (:

[EDITED]

There are new versions of freetype packages in Debian unstable repositories as well - 2.3.9-5. Patched packages - 2.3.9-5.1 - are already on my server.
Thank you for make these packages public, they rock!
Please do update your packages with the official repository, create a debian source would be even better!
Sorry for being so greedy ;)

ganquan
Posts: 5
Joined: 2007-08-22 03:25

Re: About the LCD ClearType patch

#35 Post by ganquan »

Hadret wrote:I didn't checked yet if version from experimental repository (1.9.4) need David Turner's patch or not. It would be great if not.
libcairo2-1.9.4 still needs the patch.
Can you attach the patch you applied to libcairo? Is it from here?

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

Re: About the LCD ClearType patch

#36 Post by Hadret »

ganquan wrote:libcairo2-1.9.4 still needs the patch.
True (:
ganquan wrote:Can you attach the patch you applied to libcairo? Is it from here?
Yes, that's the one. I haven't try if it is working for libcairo2 from experimental.

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

Re: About the LCD ClearType patch

#37 Post by Hadret »

New libcairo2 update (1.8.10-3) in Debian Unstable. Patched packages (1.8.10-3.1) for amd64 are already available here: http://debian.hadret.com/ (:

ganquan
Posts: 5
Joined: 2007-08-22 03:25

Re: About the LCD ClearType patch

#38 Post by ganquan »

Hadret wrote:New libcairo2 update (1.8.10-3) in Debian Unstable. Patched packages (1.8.10-3.1) for amd64 are already available here: http://debian.hadret.com/ (:
Yes yes yes! :D

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

Re: About the LCD ClearType patch

#39 Post by Hadret »

1) Moved libcairo2 packages to http://debian.hadret.com/libcairo2
2) Added i386 arch*.

* - it's experimental as it's my first packages built on amd64 for i386 arch using pbuilder.

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

Re: About the LCD ClearType patch

#40 Post by Hadret »

From now on, there's repository for amd64 and i386 with patched cairo packages: http://hadret.rootnode.net/ (:

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: About the LCD ClearType patch

#41 Post by gradinaruvasile »

Thanks, the system fonts look really good now.
BTW i use Squeeze, i just added the repo, upgraded the packages, killed nautilus & gnome-panel, logged out of gnome-terminals (and logged back in) and everything is smooth now. :D
Hope it wont break anything in the long run...

PS. What are the odds of these packages making it in the main repos?

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

Re: About the LCD ClearType patch

#42 Post by Hadret »

gradinaruvasile wrote:Hope it wont break anything in the long run...
It shouldn't. These are normal cairo packages with additional patch. You can look here: http://hadret.rootnode.net/debian/dists ... ian.tar.gz, patch is in debian/patches and it's called 02_lcd-cleartype.patch (:
gradinaruvasile wrote:PS. What are the odds of these packages making it in the main repos?
AFAIR there were some license obstacles, but I can't recall any details...

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

Re: About the LCD ClearType patch

#43 Post by Hadret »

For the most recent informations about changes in my PPA (like adding, removing and updating packages) check out my Hadret's.Posterous (:

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: About the LCD ClearType patch

#44 Post by gradinaruvasile »

You should post a thread about this in the how-to section too. I think there are many Debian users who want hassle-free smooth fonts.

And some documentation would be useful there - mostly about setting the system fonts (linking the /etc/fonts/conf.d/ /etc/fonts/conf.avail/ may not be not straightforward for casual users).

careta
Posts: 10
Joined: 2009-01-05 15:18

Re: About the LCD ClearType patch

#45 Post by careta »

Hi guys, I have good news.

Apparently there is no need to patch cairo anymore in testing. I've been conducting a few experiments and I can see no difference between the normal and the patched cairo. You don't even need Ubuntu fontconfig files!

I have to change the following configuration files:

~/.fonts.conf

Code: Select all

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

   <!-- 
   These settings MUST be reflected in ~/.Xresources
   --> 
   
	<match target="font" >
  		<edit mode="assign" name="rgba" >
   	   <const>none</const>
  		</edit>
 	</match>

 	<match target="font" >
  		<edit mode="assign" name="hintstyle" >
   	   <const>hintslight</const>
  		</edit>
 	</match>

 <!-- 
 to debug, "export FC_DEBUG=1" on a 
 terminal and launch gedit/lxpanel/whatever 
 -->

</fontconfig>
~/.Xresources

Code: Select all

# These settings MUST be reflected in ~/.fonts.conf  

Xft.hintstyle:	         hintslight    
Xft.rgba:	            none    

# do not mess with any of the ones below, should be set auto by fontconfig
#Xft.antialias:		   0                     
#Xft.hinting:	      	1                      
#Xft.lcdfilter:	         lcddefault
#Xft.autohint:       	0
#Xft.dpi:	            100  - not needed, hintslight + rgba.none works great with 96 dpi              

# see http://www.freedesktop.org/wiki/ScreenFontSettings
Now replace the patched libcairo2 with the normal Debian testing version, remove the symlinks in /etc/fonts/conf.d/ for the Ubuntu fontconfig files and restart GDM/XDM or reboot.

See for yourself! Great fonts!

Regards

User avatar
gradinaruvasile
Posts: 935
Joined: 2010-01-31 22:03
Location: Cluj, Romania
Contact:

Re: About the LCD ClearType patch

#46 Post by gradinaruvasile »

Doesnt work for me. I get the same blocky fonts as before.

careta
Posts: 10
Joined: 2009-01-05 15:18

Re: About the LCD ClearType patch

#47 Post by careta »

Really? Either it works for me or am I completely blind. But I think its the first one.

Would you mind posting a before/after screenshot?

shifteight
Posts: 2
Joined: 2010-05-21 07:11

Re: About the LCD ClearType patch

#48 Post by shifteight »

Really no need to patch cairo? I hope it be good news! I'll try it soon!

shifteight
Posts: 2
Joined: 2010-05-21 07:11

Re: About the LCD ClearType patch

#49 Post by shifteight »

absolutely no effect!

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

Re: About the LCD ClearType patch

#50 Post by Hadret »

careta wrote:See for yourself! Great fonts!
I did. And fonts were awful, I still need patched cairo.
gradinaruvasile wrote:You should post a thread about this in the how-to section too. I think there are many Debian users who want hassle-free smooth fonts.

And some documentation would be useful there - mostly about setting the system fonts (linking the /etc/fonts/conf.d/ /etc/fonts/conf.avail/ may not be not straightforward for casual users).
The thing is, I'm not a specialist. I'm just using patched version of cairo and suggestions from David Turner's website. That's all, but it's working for me (:

Post Reply