From: Luc Moulinier on
Hello !

There are things I don't understand in Xft handling in Tcl.

I'm working with Tcl/tk 8.6. By issuing :
if {[catch {::tk::pkgconfig get fontsystem} xft]} {set xft no-xft}
-> puts $xft gives xft. Also, in config.log, the flag HAVE_XFT is set
to 1. OK, my tcl/tk is Xft enabled .
In my widget, I use a xlib function , XDrawImageString, which does NOT
work with Xft fonts (see http://keithp.com/~keithp/render/Xft.tutorial
).
I allocate a font using Tk_AllocFontFromObj giving the XLFD name -
adobe-courier-medium-r-normal--11-0-75-75-m-0-iso8859-1. And my
routine using XDrawImageString is working perfectly !

In the wiki (http://wiki.tcl.tk/9015) it's said that you can not have
xft and non-xft fonts at the same time ... So what happend in my
case ?

An other question : Is it possible at the C level to know if a font is
a xft one or not ?

Thanks for enlighhting me !
Luc
From: Harald Oehlmann on
Dear Luc,
as nobody answered, I would recommend to ask on the core list in this
case.

Regards,
Harald
From: Donal K. Fellows on
On 10 Aug, 07:14, Harald Oehlmann <wortka...(a)yahoo.de> wrote:
> as nobody answered, I would recommend to ask on the core list in this
> case.

It won't change the fact that I'll still have no idea. :-)

Tk has a single font system in use at one time. There's nothing to
stop the programmer from directly accessing the classic X11 font
system, but in that case they have to everything themselves; there's
no guarantee at all that any font token returned by Tk will work with
XDrawImageString or any other part of the X11 API, and Tk_DrawChars is
the only public rendering interface that produces text using a Tk_Font
handle. (There are some internal ones too, but they're messy,
complicated, and not exported.)

Donal.
From: Luc Moulinier on
Thanks for answering. Things are more and more clearer. I'll pout all
that on the wiki.

Thanks again.
Luc