Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How --enable-xft breaks backwards compatibility

19 views
Skip to first unread message

George Peter Staplin

unread,
Dec 8, 2007, 10:55:11 PM12/8/07
to
I want to clarify the --enable-xft issues.

First, most users of Tk_RedrawChars and friends won't have a problem.
However there are some users that have found a problem, and the core
team won't fix it, so your only option is to --disable-xft. Affected
extensions include BLT (when rotating text), and others.

Now I shall attempt to explain the issue. Originally the Xft patch was
written by Keith Packard. Joe English graciously cleaned it up, and got
it into a state where it could be applied.

The basic problem is that everytime Tk_DrawChars is called, it's assumed
that the depth of the drawable is > 1 when using Xft.

Xft provides XftDrawCreateBitmap(); for creating a data structure
suitable for the 1-bit deep pixmaps/drawables. Tk with --enable-xft
doesn't use this. Unfortunately because the depth of the Drawable isn't
passed to Tk_DrawChars the only proper way to get the depth is to call
something like XGetGeometry(). Jeff Hobbs and Joe English have
deemed the XGetGeometry too costly with remote X servers. So, an X
error occurs when Tk/Xft tries to draw text.

It's too late to fix the API, and with Hobbs and English being resistant
we can't fix this properly at the moment. So, some of you may need to
--disable-xft, or patch Tk manually.

I hope this clears up any uncertainty.


George


Torsten Berg

unread,
Dec 10, 2007, 3:55:40 AM12/10/07
to

> First, most users of Tk_RedrawChars and friends won't have a problem.
> However there are some users that have found a problem, and the core
> team won't fix it, so your only option is to --disable-xft. Affected
> extensions include BLT (when rotating text), and others.

Hm, do I understand that correctly? The new Tcl version will be
compiled with --enable-xft
by default and this will prevent BLT from running? But if I want anti-
aliasing in Tk I need xft (on X11 systems)? So I cannot get smooth
fonts AND BLT at the same time?

Is that correct?

Slowly, BLT starts stinking. It is such a brilliant extension for
graphs (I only use it for graphs) but it seems to induce many
restrictions that prevent me from upgrading and enhancing my apps.

Torsten

George Peter Staplin

unread,
Dec 10, 2007, 4:35:29 AM12/10/07
to
Torsten Berg wrote:
>
>> First, most users of Tk_RedrawChars and friends won't have a problem.
>> However there are some users that have found a problem, and the core
>> team won't fix it, so your only option is to --disable-xft. Affected
>> extensions include BLT (when rotating text), and others.
>
> Hm, do I understand that correctly? The new Tcl version will be
> compiled with --enable-xft
> by default and this will prevent BLT from running? But if I want anti-
> aliasing in Tk I need xft (on X11 systems)? So I cannot get smooth
> fonts AND BLT at the same time?
>
> Is that correct?

It will prevent some parts of BLT from working, and result in a fatal X
error. If you want antialiasing with X11 you currently need Xft if you
use Tk's drawing routines.

>
> Slowly, BLT starts stinking. It is such a brilliant extension for
> graphs (I only use it for graphs) but it seems to induce many
> restrictions that prevent me from upgrading and enhancing my apps.

The new Tk 8.5 has --enable-xft by default. Hopefully a workaround
can be implemented in BLT and others affected by this. It's
unfortunate that correctness vs. performance is an issue.


George

Joe English

unread,
Dec 10, 2007, 10:33:41 AM12/10/07
to
George Peter Staplin wrote:
> I want to clarify the --enable-xft issues.
>
> First, most users of Tk_RedrawChars and friends won't have a problem.
> However there are some users that have found a problem, and the core
> team won't fix it, so your only option is to --disable-xft.

Another solution is to pass a full-depth Pixmap to Tk_DrawChars()
instead of a Bitmap. Extensions will generally want to do this
anyway so that compositing works properly.


--Joe English

0 new messages