Bug 496191

Summary: LCD filter patch for cairo (for clear-type like fonts)
Product: [Fedora] Fedora Reporter: David Hlacik <david>
Component: cairoAssignee: Benjamin Otte <otte>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 14CC: allisson, behdad, bernie+fedora, craftjml, fargiolas, felix, jonathan.underwood, nikosx, qiuyingbo, rdieter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://packages.ubuntu.com/jaunty/source/cairo
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 15:44:23 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 496192    
Attachments:
Description Flags
patch which makes to use LCD filter none

Description David Hlacik 2009-04-17 03:00:46 EDT
Created attachment 339963 [details]
patch which makes to use LCD filter

Hello guys,

This discussion is about font rendering in Fedora. As we all know, there are patches for subpixel hinting and bytecode interpreter included in freetype package to achieve better fonts performance. However this patches are just included and not enabled by default, because of fedora policy (patent problems etc.). This is absolutely all right.

The patches for freetype were originally created by David Turner, author of freetype. However to fully achieve nice font rendering we also need to patch cairo and libXft.

What I am writing about is how fonts are rendered in Ubuntu. Who tried Ubuntu, knows that fonts are rendered way to much better than in our Fedora.
This is partially because of patches for subpixel hinting and bytecode interpreter , which we have in Fedora (and are enabled via freetype-freeworld in RPMfusion package). However additional patches should be present in cairo and libXft (which are in Ubuntu) to improve font performance on LCD displays. Those were created by author of freetpye David Turner as well, and to achieve needed "clear-type" feeling, they are required.

My point here is, that we have subpixel & bytecode interpreter patches in freetype, but do not have lcd filter patches in cairo and libXft.

I have created an request to add my freetype,cairo,libXft libraries to RPMfusion, but after discussion with freetype-freeworld author we really believe that these patches for cairo and libXft can be added to Fedora.

(--taken from discussion on rpmfusion--)
* in cairo, the relevant patch is 04_lcd_filter.patch. That patch actually
REMOVES code which may be infringing some patents from Cairo, making it use the
freetype LCD filter instead (which is better than the simple one Cairo
contained). So why is that patch not upstream? This should go both upstream and
in the Fedora package, a -freeworld package is not needed at all.
* Please get those 2 patches (1 per package) accepted by upstream
and by the Fedora maintainers, pointing out they actually REMOVE potentially
patented code and leave it up to freetype whether to provide it or not (and
Fedora's freetype doesn't).

Screens of Fedora without patches :
http://power.polarion.com/_screen/default1.png
http://power.polarion.com/_screen/default2.png
http://power.polarion.com/_screen/default3.png

Screens of Fedora without patches :
http://power.polarion.com/_screen/lcd1.png
http://power.polarion.com/_screen/lcd1.png
http://power.polarion.com/_screen/lcd1.png

--Summary--
please include 04_lcd_filter.patch (attached) in cairo
Comment 2 David Hlacik 2009-04-17 03:19:10 EDT
The patch was extracted from Ubuntu's source package for cairo
http://archive.ubuntu.com/ubuntu/pool/main/c/cairo/cairo_1.8.6-1ubuntu2.diff.gz
Comment 3 Felix Kaechele 2009-04-17 04:31:52 EDT
I believe that there is still a typo in you links. These are correct:
Screens of Fedora without patches :
http://power.polarion.com/_screen/default1.png
http://power.polarion.com/_screen/default2.png
http://power.polarion.com/_screen/default3.png

Screens of Fedora *with* patches :
http://power.polarion.com/_screen/lcd1.png
http://power.polarion.com/_screen/lcd2.png
http://power.polarion.com/_screen/lcd3.png
Comment 4 Jonathan Underwood 2009-04-17 06:37:44 EDT
Wouldn't these patches be better pushed upstream?
Comment 5 Behdad Esfahbod 2009-04-17 13:08:06 EDT
(In reply to comment #4)
> Wouldn't these patches be better pushed upstream?  

Indeed.
Comment 6 David Hlacik 2009-04-18 06:42:23 EDT
Yes sure, the point is, that I would like to see that as soon as possible in Fedora. The fonts really does look radically better with this patch (and Xft one).

This is a related bug on freedesktop (cairo) bugzilla :

https://bugs.freedesktop.org/show_bug.cgi?id=10301
Comment 8 David Hlacik 2009-04-28 17:18:19 EDT
OpenOffice is based on qt as far as I know. Qt does not respect gnome font settings. However with the cairo-respect-fontconfig it does respect fontconfig files.

As root do a following :
ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d/
As a result OpenOffice will use sub-pixel smoothed fonts, however you will be no longer able to disable sub-pixel font rendering in gnome font settings, as 10-sub-pixel-rgb.conf will override this.
Comment 9 David Hlacik 2009-04-28 17:19:18 EDT
* with the cairo-respect-fontconfig patch presented in my cairo it does respect fontconfig
Comment 10 Jud Craft 2009-04-29 17:27:40 EDT
Minor note:

OpenOffice doesn't use Qt, it uses its own visual toolkit library, with its own quirks regarding fontconfig.

http://www.openoffice.org/servlets/ReadMsg?list=discuss&msgNo=33435
http://gsl.openoffice.org/
(main project page)
Comment 11 Nikos Charonitakis 2009-05-10 15:19:19 EDT
also, i found that gnucash is not affected by the changes.
Comment 12 Bug Zapper 2009-06-09 09:59:21 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 13 Bug Zapper 2010-04-27 09:43:18 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 14 Fedora Admin XMLRPC Client 2010-06-17 11:23:41 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 15 Bug Zapper 2010-07-30 06:38:21 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 16 Fedora End Of Life 2012-08-16 15:44:26 EDT
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping