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
matino
Posts: 79
Joined: 2007-02-24 17:03

Re: About the LCD ClearType patch

#21 Post by matino »

EDzior wrote: Hi. I will try to get this simple and straight.

1. Freetype - subpixel rendering is already enabled by default in Debian (testing/unstable)
2. Xft - support for subpixel rendering is already supported by upstream, no patches needed (testing/unstable)
3. Cairo - subpixel rendering is not enabled by default in Debian (testing/unstable) patch needed
4. Fontconfig - subpixel rendering is supported in Debian but if you want to make effects like in Ubuntu you have to apply their patches (in my opinion).

Now, Qt/KDE applications uses Xft for subpixel rendering, so if you're using Debian testing/unstable (KDE 4.2.x/Qt 4.5.x) you don't need to patch anything.
GTK+/Gnome applications uses Cairo for subpixel rendering, so if you want this rendering you need to patch Cairo (with Ubuntu patch for example)

I'm using Debian testing/unstable (KDE 4.2.x/Qt 4.5.x) with subpixel rendering but I'm also using some GTK+ applications (ex. Iceweasel) so:
1. I've build fontconfig packages from Ubuntu Jaunty sources
2. I've patched Cairo packages for subpixel rendering (GTK+ applications)

If you want to try these packages you can find them here: http://sites.google.com/site/emikaadeo/home/packages
They're for Debian unstable (i386), but should also work on testing.

Regards.
It's briliant man, thanks a lot for sharing ! :D
Debian Sid/Experimental with KDE 4.2

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

Re: About the LCD ClearType patch

#22 Post by Hadret »

If anybody need amd64 packages with David Turner's patches applied, just let me know. They apply and build just fine, only in fontconfig I had to use option to ignore gpg signing (there were some error with it, I don't know why and if it's still existing).

User avatar
ootput
Posts: 4
Joined: 2009-05-16 22:55

Re: About the LCD ClearType patch

#23 Post by ootput »

Hadret wrote:If anybody need amd64 packages with David Turner's patches applied, just let me know. They apply and build just fine, only in fontconfig I had to use option to ignore gpg signing (there were some error with it, I don't know why and if it's still existing).
Sure mate! If you can outline how you built them too, that'd be awesome!.. as I'm sure these will be updated quite frequently in sid.
Image

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

Re: About the LCD ClearType patch

#24 Post by EDzior »

Hadret wrote:If anybody need amd64 packages with David Turner's patches applied, just let me know. They apply and build just fine, only in fontconfig I had to use option to ignore gpg signing (there were some error with it, I don't know why and if it's still existing).
I might be wrong but I don't think that this is a good idea to apply those patches. They're for older versions of libraries (ex. cairo-1.2.4)
There were a lot of code changing from that time. So even if they apply to sources, they can break ABI/API.
Debian testing/unstable + KDE4

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

Re: About the LCD ClearType patch

#25 Post by Hadret »

ootput wrote:Sure mate! If you can outline how you built them too, that'd be awesome!.. as I'm sure these will be updated quite frequently in sid.
I will, only when I get some free time and I will be sure, that those packages are working fine (:
EDzior wrote:I might be wrong but I don't think that this is a good idea to apply those patches. They're for older versions of libraries (ex. cairo-1.2.4)
There were a lot of code changing from that time. So even if they apply to sources, they can break ABI/API.
I might be wrong as well, but: patches applied without issue (there were only informations, that some hunks were in different lines than in previous versions of), packages compiled and installed without any problems, and I'm using those packages for a while now and I haven't got any problems with them. Quite the contrary - I feel much improvement of my fonts (:

BUT, I haven't got knowledge if they can break a thing or not, so if want to use them, use them on your own responsibility! (:

Here they are: http://hadret.com/debian/

As I said previously, they're only for amd64 arch. Here are packages I've got installed on my system:

Code: Select all

[~]$ dl libfreetype6
ii  libfreetype6                         2.3.9-4.2                    FreeType 2 font engine, shared library files
ii  libfreetype6-dev                     2.3.9-4.2                    FreeType 2 font engine, development files
[~]$ dl libxft2
ii  libxft2                              2.1.13-3.1                   FreeType-based font drawing library for X
[~]$ dl libcairo2
ii  libcairo2                            1.8.6-2.1                    The Cairo 2D vector graphics library
ii  libcairo2-dev                        1.8.6-2.1                    Development files for the Cairo 2D graphics library
Here's a screenshot:

Image

My configuration is: resolution 1680x1050 and 99 DPI, LCD, slight, RGB.

You cant find here (http://hadret.com/debian/) also Rhythmbox packages with New Style Last.fm Scrobbler Patch, but there's no yet version for 0.12.1 :(

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

Re: About the LCD ClearType patch

#26 Post by EDzior »

If it's working without a hitch then is ok ;)
Here's my screenshot:
Resolution 1280x800, 96 dpi, LCD, slight, RGB
Image
Debian testing/unstable + KDE4

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

Re: About the LCD ClearType patch

#27 Post by Hadret »

Glad they're working fine for you (:

P.S. They look darker on your shot :o

phoneservice
Posts: 3
Joined: 2009-06-08 07:30

Re: About the LCD ClearType patch

#28 Post by phoneservice »

tks. yestoday i found this pb, so done..

User avatar
sickie
Posts: 498
Joined: 2009-06-08 07:10
Location: The pig farm
Has thanked: 27 times
Been thanked: 2 times

Re: About the LCD ClearType patch

#29 Post by sickie »

Hello people (:
I haven't patched my testing with GNOME system and actually don't need to. I really like how my fonts are rendered (Droid fonts); is this patching/font issue relevant only to LCD screens? Because I have a CTR, 21", 1600x1200 resolution. Anyway, here's a screenshot:
Image
:shock:

namaku0
Posts: 4
Joined: 2009-05-03 07:58

Re: About the LCD ClearType patch

#30 Post by namaku0 »

Hi, just want to let you know.

I had the chance to install Debian again (squeeze/testing) so
I tried to download these packages from Ubuntu's (jaunty) repo:
  • - fontconfig_2.6.0-1ubuntu12_i386.deb
    - libcairo2_1.8.6-1ubuntu2_i386.deb
    - libdirectfb-1.0-0_1.0.1-11ubuntu1_i386.deb
    - libfreetype6_2.3.9-4ubuntu0.1_i386.deb
    - libxft2_2.1.13-3ubuntu1_i386.deb
and install all of them on my Debian. It works, I got better
font rendering. I don't know if this will break something
somewhere, but no problem so far.

EDIT: forgot to mention that I installed fontconfig-config_2.6.0-1ubuntu12_all.deb
too and apparently causing broken dependencies (but can be ignored).

EDIT2: If you don't want to install Ubuntu's version of fontconfig-config
above. Create these symbolic links on /etc/fonts/conf.d/* to the
*.conf files available on /etc/fonts/conf.avail/*
  • - 10-antialias.conf
    - 10-hinting.conf
    - 10-hinting-slight.conf
    - 11-lcd-filter-lcddefault.conf
    - 53-monospace-lcd-filter.conf
EDIT3: After a couple of tests, actually all you need from Ubuntu are
libcairo2 & libdirectfb and everything on EDIT2.

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/ (:

Post Reply