Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 284218 - net-irc/xchat: confusing use of 'xft' USE flag.
Summary: net-irc/xchat: confusing use of 'xft' USE flag.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-08 21:52 UTC by Nick Bowler
Modified: 2011-01-19 17:42 UTC (History)
3 users (show)

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


Attachments
Replace USE=xft with USE=-pango (xchat-xft-pango.patch,1.02 KB, patch)
2009-09-08 21:53 UTC, Nick Bowler
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Bowler 2009-09-08 21:52:10 UTC
The 'xft' USE flag is a global USE flag with the following description:

  xft - Build with support for XFT font renderer (x11-libs/libXft)

This seems innocent enough.  Indeed, on app-editors/emacs, enabling this USE flag gives us improved font rendering using Xft (with antialiased fonts and other niceties).  Same goes for openmotif.  A handful of other packages use this flag but I have not tried them -- I would suspect that enabling it on fltk has similar results to openmotif.

However, on net-irc/xchat, this flag has the effect of disabling Pango (for the main text area only) and using Xft directly.  Further note that enabling or disabling this flag does not affect "support for XFT font renderer", since Pango supports rendering using Xft.  The result is that enabling the 'xft' useflag on xchat disables the internationalization features that would normally be present in the text area (most notably multiple font selection).  I hear that it also makes scrolling somewhat faster.

I propose that disabling Pango for the main text area should be done with USE="-pango" rather than USE="xft".  The default should be to use pango.  I have attached a patch which does this.
Comment 1 Nick Bowler 2009-09-08 21:53:10 UTC
Created attachment 203542 [details, diff]
Replace USE=xft with USE=-pango
Comment 2 Matt Turner gentoo-dev 2010-12-26 20:44:35 UTC
Is something holding this up? It seems like a slam dunk.
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-19 15:34:26 UTC
The problem here is that even with --enable-xft xchat links to x11-libs/pango. So a pango USE flag would be more than confusing here.
To be honest I do not really know what to do with this bug. I can see the reporter's point but I don't have any good idea how to implement this in a good way in the ebuild.
Comment 4 Nick Bowler 2011-01-19 17:03:56 UTC
The main confusion arises from the fact that _enabling_ the xft useflag
_disables_ important features (and the program can render fonts with libXft
regardless of how you set the 'xft' useflag, because it uses pango).  This use
of 'xft' (a global use flag) is not consistent with either its description or
its use in other packages.

Renaming the flag to just about *anything* else would solve this issue.  How
about 'xchatfastscroll' instead?
Comment 5 Matt Turner gentoo-dev 2011-01-19 17:10:08 UTC
(In reply to comment #3)
> The problem here is that even with --enable-xft xchat links to x11-libs/pango.
> So a pango USE flag would be more than confusing here.
> To be honest I do not really know what to do with this bug. I can see the
> reporter's point but I don't have any good idea how to implement this in a good
> way in the ebuild.

Just get rid of the flag. It's clear that no one really knows why using xft directly is/would be better, so the flag's just confusing people.

I don't think renaming it to xchatfastscroll is sensible. That's a worse kludge that what we've got now.
Comment 6 Nick Bowler 2011-01-19 17:25:47 UTC
(In reply to comment #5)
> Just get rid of the flag. It's clear that no one really knows why using xft
> directly is/would be better, so the flag's just confusing people.

From what I understand, it can make scrolling the main text area significantly
faster because it avoids much of the overhead of pango.  It was added in
response to bug 231433.  This comes at a price: you lose many of the special
features of pango.  I certainly would never make this tradeoff.

> I don't think renaming it to xchatfastscroll is sensible. That's a worse
> kludge that what we've got now.

It was just a thought: a local use flag would allow a reasonable description
of what this flag actually does.
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-19 17:27:58 UTC
+*xchat-2.8.8-r1 (19 Jan 2011)
+
+  19 Jan 2011; Lars Wendler <polynomial-c@gentoo.org> -xchat-2.8.8.ebuild,
+  +xchat-2.8.8-r1.ebuild:
+  Removed xft USE flag as its effect in xchat was different to the global
+  meaning of xft USE flag. Thanks to Nick Bowler for reporting this in bug
+  #284218.
Comment 8 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-01-19 17:42:28 UTC
Sorry I was a bit too overhasty. I now stick with a renamed USE flag:

+  19 Jan 2011; Lars Wendler <polynomial-c@gentoo.org> xchat-2.8.8-r1.ebuild,
+  metadata.xml:
+  Partially reverted my previous commit and simply renamed the xft USE flag to
+  fastscroll to better reflect its meaning.