You are not logged in.

#1 2009-11-09 00:15:02

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Ubuntu's Libxft 2.1.13 patches ported to 2.1.14

It might be a bit silly to dump it here but since I am releasing my hackery to the public some might regard it as a contribution tongue.

I have ported Ubuntu's patches for libxft 2.1.13 to 2.1.14. Of the three original patches, only the third one needed actual changing of code (one measly line). Since my C skills are mostly limited to - you got it - hacking up patches to port them, I am not promising (or guaranteeing for that matter) it will work. It's also why I am posting this topic - to get more eyes on the thing to make sure I'm not messing up stuff.

I dropped by at #xorg on Freenode to check what I did was right, and it seemed so. For those more familiar with the code, this is what I did. The patch will try to replace this line:

if (fi->antialias || fi->transform)

with this line:

if ((fi->antialias && embeddedbitmap == FcFalse) || fi->transform)

Since the 2.1.14 code had

if ((!bitmap && fi->antialias) || fi->transform)

I adapted the new line to be

if ((!bitmap && fi->antialias && embeddedbitmap == FcFalse) || fi->transform)

Also, the part on disabling bitmaps by request has no clear location in the patch (it is unclear whether it's supposed to go right after the following line:

fi->load_flags = FT_LOAD_DEFAULT;

or right after the first switch statement following that line, I made a guess. After fixing up the patches I got a few double variable declarations that broke compilation, I fixed that:

xftdpy.c:163: let op: assignment makes integer from pointer without a cast
  CC     xftextent.lo
  CC     xftfont.lo
  CC     xftfreetype.lo
  CC     xftglyphs.lo
xftglyphs.c: In functie 'XftFontLoadGlyphs':
xftglyphs.c:689: fout: redeclaration of 'line' with no linkage
xftglyphs.c:686: note: previous declaration of 'line' was here
xftglyphs.c:690: fout: redeclaration of 'i' with no linkage
xftglyphs.c:688: note: previous declaration of 'i' was here
xftglyphs.c:687: let op: unused variable 'c'
make[2]: *** [xftglyphs.lo] Fout 1
make[2]: *** Wachten op onvoltooide taken...
make[2]: Map '/home/stijn/pkgbuilds/libxft-ubuntu/src/libXft-2.1.14/src' wordt verlaten
make[1]: *** [all-recursive] Fout 1
make[1]: Map '/home/stijn/pkgbuilds/libxft-ubuntu/src/libXft-2.1.14' wordt verlaten
make: *** [all] Fout 2

Feel free to correct me if needed.

While this all looks fairly trivial I wouldn't want to risk anything by not having it double checked, hence this topic. The PKGBUILD and patches can be found here (PKGBUILD comes straight from the AUR with a few adaptations).

For the faint-hearted: I built the package, recompiled the latest freetype2-ubuntu from AUR, and rebooted. My system is still alive and kicking, and I can't notice any font differences.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#2 2009-11-09 01:19:28

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Ubuntu's Libxft 2.1.13 patches ported to 2.1.14

libXft 2.1.14 with Ubuntu's patches is in the devnull overlay.

Offline

#3 2009-11-09 01:23:31

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Ubuntu's Libxft 2.1.13 patches ported to 2.1.14

Well... If I had known that before wink. I guess nobody found the way to the AUR yet, since it's still on outdated there.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2009-11-09 04:03:37

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Ubuntu's Libxft 2.1.13 patches ported to 2.1.14

Nice work, B.  I think wonder is a little busy now smile.  Will try later and tell you how it goes.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#5 2009-11-09 10:11:20

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Ubuntu's Libxft 2.1.13 patches ported to 2.1.14

thanks guys. i was busy this days and neglected aur big_smile


Give what you have. To someone, it may be better than you dare to think.

Offline

Board footer

Powered by FluxBB