Bug 625441

Summary: include subpixel-enabled cairo/freetype2 pkgs in Opensuse system &/or Firefox builds
Product: [openSUSE] openSUSE 11.3 Reporter: r b <rb.bugs.mozilla>
Component: BasesystemAssignee: E-mail List <gnome-bugs>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: anshulajain, ciaran.farrell, pascal.bleser, vkrevs, wolfgang
Version: Final   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 11.3   
See Also: https://bugzilla.mozilla.org/show_bug.cgi?id=581715
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description r b 2010-07-26 06:28:16 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100626 SUSE/3.6.6-1.2 Firefox/3.6.6

per discussion with wrosenauer, opening to initiate discussion abt adding subpixel support to system's cairo/freetype2 packages.

opensuse 11.3's Firefox 3.6.6 is built with "--use-system-cairo" config option.

if/when the "ubuntu patch backported" subpixel-enabled cairo/freetype packages are installed,

(
Discussion here:
    
  http://forums.opensuse.org/english/get-help-here/applications/442295-subpixel-hinting-packages-ubuntu-lucid-patches-now-available-11-3-a-2.html,

Repo here:
    
  http://download.opensuse.org/repositories/home:/anshuljain:/ubuntu_patch_11.3_backport/openSUSE_11.3
)

font rendering in Firefox is great.

However, upgrades to upcoming Firefox 3.6.8 &/or 4.0.x @obs have that options DISabled/not included -- as do, apparently, any/all FF upstream builds. That results in fonts appearing 'grainy' [cref: Bug 581715  - font rendering/smoothing breaks (becomes 'grainy') @ FF ver > ~ 3.6.8 https://bugzilla.mozilla.org/show_bug.cgi?id=581715].

This raises the question(s) of should a subpixel-enabled cairo/freetype2 be included (a) in upstream FF, (b) as a default option in opensuse FF builds, &/or (c) as a default option in opensuse system.

Iiuc, the previous patent encumberbments (Apple?) preventing default inclusion of subpixel support have expired.  It seems that Ubuntu may be choosing to include those libs in distro ...

In any case, there are technical, user experience, and legal questions wrapped up in this discussion.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Wolfgang Rosenauer 2010-07-26 07:13:02 UTC
I don't know the legal status nowadays. Any facts?
Comment 2 Anshul Jain 2010-07-26 09:22:17 UTC
From what I understand- the BCI (Byte Code Interpreter) was patented by Apple, and it expired recently. Thus the freetype 2.4.x release. Subpixel Hinting is patented by Microsoft and it hasn't expired.
Comment 4 r b 2010-07-26 16:27:56 UTC
fyi, @

  "ClearType Patents, FreeType and the Unix Desktop: an explanation"
   http://david.freetype.org/cleartype-patents.html

unfortunately, that's dated: 2007-06-01

There's more here:

   https://secure.wikimedia.org/wikipedia/en/wiki/Subpixel_rendering#Patents

I'm getting the sense this is ... not completely clear yet.

In any case, I'd suggest the *goal* state needs to be 'clean fonts' ... in/across Opensuse & apps -- e.g. FireFox.  How to get there, is up for grabs.  Whatever the 'real solution' is, it should be clearly documented.

No surprise to anyone that having to do some/all of --
 -- use, or not, 'custom' packages
 -- tweak settings in X11 configs
 -- change settings in GNOME, KDE & Qt admin panels
 -- change settings in each app, either runtime or buildtime

is less than ideal.
Comment 5 r b 2010-07-26 16:55:19 UTC
Here's a comparison shot of OpenOffice & KWrite, both displaying text in TimesNewRoman, 12pt:

  http://img840.imageshack.us/img840/289/fontcompare.png

note that both the document text AND the app menu/window text are significantly cleaner @Kwrite.

this is with the subpixel libs from Anshul's repos installed, and associated configs.

fyi,

  ldd /usr/lib64/ooo3/program/soffice.bin | egrep -i "free|cairo"
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f6ca5201000)
  ldd /usr/bin/kwrite | egrep -i "free|cairo"
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f9aa6249000)

and,

rpm -qa | grep -i freetype
  freetype2-feature-subpixel-hinting-2.4.1-1016.1.x86_64
  libfreetype6-2.4.1-1016.1.x86_64
  freetype2-devel-32bit-2.4.1-999.subpixel.20.1.x86_64
  libfreetype6-32bit-2.4.1-999.subpixel.20.1.x86_64
  freetype2-devel-2.4.1-1016.1.x86_64
Comment 6 Pascal Bleser 2010-07-29 14:14:56 UTC
[...] 
> this is with the subpixel libs from Anshul's repos installed, and associated
> configs.
[...]
> rpm -qa | grep -i freetype
>   freetype2-feature-subpixel-hinting-2.4.1-1016.1.x86_64
>   libfreetype6-2.4.1-1016.1.x86_64
>   freetype2-devel-32bit-2.4.1-999.subpixel.20.1.x86_64
>   libfreetype6-32bit-2.4.1-999.subpixel.20.1.x86_64
>   freetype2-devel-2.4.1-1016.1.x86_64

That's quite a mixture of packages from Anshul's repository (those with 1016.1) and from the Subpixel repository (those with 999.subpixel).

In any case, the Subpixel repository provides everything that's needed. I don't see why Anshul has replicated that in his own repository on the OBS (not entirely sure we can actually keep those packages on the OBS for legal reasons).

There is no need to patch cairo any further, as openSUSE 11.3 provides a cairo package that already has all the patches Ubuntu is shipping too.

That being said, for Firefox, when using its own build of cairo, there is merely a need to patch that in-tree cairo as well, with the same patches as in the cairo RPM in openSUSE 11.3 (or Factory, for that matter).
Comment 7 Anshul Jain 2010-07-29 14:29:20 UTC
Pascal,
The as far as the "*.subpixel" packages are concerned, I merely took the .spec files (yeah I know I could've taken it from the official packages) from the Subpixel repo and added all of the patches from Ubuntu Lucid/Maverick to get thhe same effect...and followed it for fontconfig and cairo as well. I was successful and left it there...

The packages have now been removed from the OBS. I hope there is no legal matter now.
Comment 8 r b 2010-07-29 15:46:42 UTC
> That's quite a mixture of packages

One's 32-bit, the other's 64-bit.  Anshul's packages are newer & more recently discussed in light of Ubuntu's successful patches.  Hence the interest & testing.

> there is merely a need to patch that in-tree cairo as well

Can you clarify how that addresses the legal issue?  If having Anshul's patched repos on OBS is questionable for legal reasons, certainly adding those patches to Firefox, also on OBS, will be problematic ...
Comment 9 Wolfgang Rosenauer 2010-07-29 16:33:30 UTC
Speaking of Firefox:
Up to now Firefox is using system cairo -> already works
I'll change Firefox to use internal cairo but will apply the needed lcd filter patch. Actually this has been already done in OBS' mozilla repository.
The cairo patch itself has no above mentioned issues afaik.

freetype's support probably has so I think we've done here what is possible to do?
Comment 10 Tomáš Chvátal 2017-08-11 13:40:18 UTC
This is partially fixed already in Leap/Tumbleweed as patents expired.
11.3 is out of support so closing.