Tk Source Code

Artifact [91f2a76f]
Login

Artifact 91f2a76fdd6aed17804b82393d04fe4778328f79:

Attachment "tk-xft-pkgconfig.patch" to ticket [971980ff] added by jenglish 2004-06-13 12:46:15.
Date: Sat Jun 12 10:33:30 PM PDT 2004
Files: unix/tkUnixRFont.c

--- unix/tkUnixRFont.c.xft-pkgconfig.old	2003-11-23 08:44:25.000000000 -0800
+++ unix/tkUnixRFont.c	2004-06-12 22:31:03.000000000 -0700
@@ -37,10 +37,27 @@
     XftColor	    color;
 } UnixFtFont;
 
+
+/*
+ * Package initialization:
+ * 	Nothing to do here except register the fact that we're using Xft
+ * 	in the TIP 59 configuration database. 
+ */
+
+#ifndef TCL_CFGVAL_ENCODING
+#define TCL_CFGVAL_ENCODING "ascii"
+#endif
+
+static Tcl_Config cfg[] = {
+    { "fontsystem", 	"xft" },
+    { 0,0 }
+};
+
 void
 TkpFontPkgInit(mainPtr)
     TkMainInfo *mainPtr;	/* The application being created. */
 {
+    Tcl_RegisterConfig(mainPtr->interp, "tk", cfg, TCL_CFGVAL_ENCODING);
 }
 
 static XftFont *