Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260076 - Improved media-libs/freetype ebuild for cleartype (coutnerparts to x11-libs/cairo[cleartype])
Summary: Improved media-libs/freetype ebuild for cleartype (coutnerparts to x11-libs/c...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-23 22:26 UTC by Nico R. Wohlgemuth
Modified: 2009-03-11 22:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libXft-2.1.13.ebuild (libXft-2.1.13.ebuild,1.03 KB, text/plain)
2009-02-23 22:28 UTC, Nico R. Wohlgemuth
Details
libXft-2.1.10-lcd-cleartype.diff (libXft-2.1.10-lcd-cleartype.diff,20.34 KB, patch)
2009-02-23 22:28 UTC, Nico R. Wohlgemuth
Details | Diff
freetype-2.3.8.ebuild (freetype-2.3.8.ebuild,3.92 KB, text/plain)
2009-02-23 22:31 UTC, Nico R. Wohlgemuth
Details
331-hmtx-no-shorts.diff (331-hmtx-no-shorts.diff,514 bytes, patch)
2009-02-23 22:31 UTC, Nico R. Wohlgemuth
Details | Diff
freetype-2.2.1-memcpy-fix.patch (freetype-2.2.1-memcpy-fix.patch,453 bytes, patch)
2009-02-23 22:31 UTC, Nico R. Wohlgemuth
Details | Diff
freetype-2.2.1-subpixel-disable-quantization.diff (freetype-2.2.1-subpixel-disable-quantization.diff,860 bytes, patch)
2009-02-23 22:31 UTC, Nico R. Wohlgemuth
Details | Diff
freetype-2.3.2-enable-valid.patch (freetype-2.3.2-enable-valid.patch,624 bytes, patch)
2009-02-23 22:32 UTC, Nico R. Wohlgemuth
Details | Diff
freetype-bdflib-large-encodings.patch (freetype-bdflib-large-encodings.patch,808 bytes, patch)
2009-02-23 22:32 UTC, Nico R. Wohlgemuth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nico R. Wohlgemuth 2009-02-23 22:26:57 UTC
x11-libs/cairo[cleartype] from portage is making the use of the cleartype patchset taken from ArchLinux. If we are using cleartype patches there, we should do it proper and add the cleartype patches for freetype and libXft too.

The ebuilds with the related patches are attached, they are using the same patches as the *-cleartype font PKGBUILDS from archlinux.

The patches are tested (for some time in devnull overlay now) and they provide a very nice font rendering indeed.
Comment 1 Nico R. Wohlgemuth 2009-02-23 22:28:32 UTC
Created attachment 182953 [details]
libXft-2.1.13.ebuild

libXft-2.1.13.ebuild with cleartype useflag
required patches: libXft-2.1.10-lcd-cleartype.diff
Comment 2 Nico R. Wohlgemuth 2009-02-23 22:28:50 UTC
Created attachment 182954 [details, diff]
libXft-2.1.10-lcd-cleartype.diff
Comment 3 Nico R. Wohlgemuth 2009-02-23 22:31:09 UTC
Created attachment 182956 [details]
freetype-2.3.8.ebuild

freetype-2.3.8.ebuild with cleartype useflag

required patches:
331-hmtx-no-shorts.diff
freetype-2.2.1-memcpy-fix.patch
freetype-2.2.1-subpixel-disable-quantization.diff
freetype-2.3.2-enable-valid.patch
freetype-bdflib-large-encodings.patch
Comment 4 Nico R. Wohlgemuth 2009-02-23 22:31:27 UTC
Created attachment 182958 [details, diff]
331-hmtx-no-shorts.diff
Comment 5 Nico R. Wohlgemuth 2009-02-23 22:31:38 UTC
Created attachment 182960 [details, diff]
freetype-2.2.1-memcpy-fix.patch
Comment 6 Nico R. Wohlgemuth 2009-02-23 22:31:50 UTC
Created attachment 182961 [details, diff]
freetype-2.2.1-subpixel-disable-quantization.diff
Comment 7 Nico R. Wohlgemuth 2009-02-23 22:32:02 UTC
Created attachment 182963 [details, diff]
freetype-2.3.2-enable-valid.patch
Comment 8 Nico R. Wohlgemuth 2009-02-23 22:32:13 UTC
Created attachment 182964 [details, diff]
freetype-bdflib-large-encodings.patch
Comment 9 Nico R. Wohlgemuth 2009-02-23 22:41:01 UTC
Comment on attachment 182963 [details, diff]
freetype-2.3.2-enable-valid.patch

that one already is in portage
Comment 10 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-23 22:42:04 UTC
Comment on attachment 182960 [details, diff]
freetype-2.2.1-memcpy-fix.patch

https://bugs.freedesktop.org/show_bug.cgi?id=6841
This is no longer a problem with ~arch poppler
Comment 11 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-23 22:53:30 UTC
Comment on attachment 182964 [details, diff]
freetype-bdflib-large-encodings.patch

This is a patch Debian has been lugging around since freetype 2.1.7, solving http://bugs.debian.org/302269 . We've never experienced it. If someone does, they can report in a seperate bug and we'll include and upstream the patch.
Comment 12 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-23 23:07:34 UTC
Comment on attachment 182958 [details, diff]
331-hmtx-no-shorts.diff

This appears to be from here:
http://www.mail-archive.com/freetype-devel@nongnu.org/msg01102.html
And seems to be obsoleted here:
http://www.mail-archive.com/freetype-devel@nongnu.org/msg01103.html
For unknown reasons, debian is still lugging it along. *shrug*
If the bug ever manifests here, we'll include the patch and upstream it.
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2009-02-24 07:24:35 UTC
That's _again_ no for libXft. I'll gladly accept the patch if upstream Xorg devs do too.

See bug #254444.

Thanks
Comment 14 Nico R. Wohlgemuth 2009-02-25 09:19:27 UTC
So, did upstream has accepted the cleartype patch for cairo?
Comment 15 Peter Alfredsen (RETIRED) gentoo-dev 2009-02-25 09:40:59 UTC
  /*************************************************************************/
  /*                                                                       */
  /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the        */
  /* TrueType glyph loader to use Apple's definition of how to handle      */
  /* component offsets in composite glyphs.                                */
  /*                                                                       */
  /* Apple and MS disagree on the default behavior of component offsets    */
  /* in composites.  Apple says that they should be scaled by the scale    */
  /* factors in the transformation matrix (roughly, it's more complex)     */
  /* while MS says they should not.  OpenType defines two bits in the      */
  /* composite flags array which can be used to disambiguate, but old      */
  /* fonts will not have them.                                             */
  /*                                                                       */
  /*   http://partners.adobe.com/asn/developer/opentype/glyf.html          */
  /*   http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html                 */
  /*                                                                       */
#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
Comment 16 Peter Volkov (RETIRED) gentoo-dev 2009-03-07 19:41:43 UTC
(In reply to comment #15)
> #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED

Peter, as I read this comment this option changes handling of truetype fonts too and since mosts TT fonts are supposed to work (and are tested) in Windows I don't think it's good idea to enable this option.

(In reply to comment #14)
> So, did upstream has accepted the cleartype patch for cairo?

Nico, yes and no. They commited it but then dropped, see:
http://bugs.freedesktop.org/show_bug.cgi?id=10301

(In reply to comment #13)
> That's _again_ no for libXft. I'll gladly accept the patch if upstream Xorg
> devs do too.

Does anybody reported this issue upstream? I've seen only message on mailing lists (very old) but URL to track on their bugzilla...
Comment 17 Peter Alfredsen (RETIRED) gentoo-dev 2009-03-11 22:38:15 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED
> 
> Peter, as I read this comment this option changes handling of truetype fonts
> too and since mosts TT fonts are supposed to work (and are tested) in Windows I
> don't think it's good idea to enable this option.

I concur. Closing. This was a bunch of random patches and the apple-rendering change.