summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManish Singh <yosh@gimp.org>2001-11-24 21:34:58 +0000
committerManish Singh <yosh@src.gnome.org>2001-11-24 21:34:58 +0000
commit05ab07e19ac7ee4caedf9a4d4db762921ccf5f35 (patch)
treebf9639247a037c47b9fc9d2b0e8cdd30431b2ecb
parent54d0b867ef0291528b49472ee397e80785df6f4f (diff)
downloadpango-05ab07e19ac7ee4caedf9a4d4db762921ccf5f35.tar.gz
acconfig.h support for --with-xftconfig-dir= path to system XftConfig file
2001-11-24 Manish Singh <yosh@gimp.org> * acconfig.h * configure.in: support for --with-xftconfig-dir= path to system XftConfig file * pango/pango-utils.c * pango/pangox.c: include "config.h", not <config.h> * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not pangoxft-fontmap.h :) * pango/mini-xft/minixftint.h * pango/mini-xft/minixftinit.c: add code for searching common locations for the XftConfig file. We search MINI_XFTCONFIG_DIR if configure defines it for us (as above), then $sysconfdir, then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
-rw-r--r--ChangeLog19
-rw-r--r--ChangeLog.pre-1-019
-rw-r--r--ChangeLog.pre-1-1019
-rw-r--r--ChangeLog.pre-1-219
-rw-r--r--ChangeLog.pre-1-419
-rw-r--r--ChangeLog.pre-1-619
-rw-r--r--ChangeLog.pre-1-819
-rw-r--r--acconfig.h2
-rw-r--r--configure.in9
-rw-r--r--pango/mini-xft/minixftinit.c58
-rw-r--r--pango/mini-xft/minixftint.h9
-rw-r--r--pango/pango-utils.c2
-rw-r--r--pango/pangox.c2
-rw-r--r--pango/pangoxft-fontmap.c2
14 files changed, 193 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index c6398cc4..92a7b132 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2001-11-24 Manish Singh <yosh@gimp.org>
+
+ * acconfig.h
+ * configure.in: support for --with-xftconfig-dir= path to system
+ XftConfig file
+
+ * pango/pango-utils.c
+ * pango/pangox.c: include "config.h", not <config.h>
+
+ * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not
+ pangoxft-fontmap.h :)
+
+ * pango/mini-xft/minixftint.h
+ * pango/mini-xft/minixftinit.c: add code for searching common
+ locations for the XftConfig file. We search MINI_XFTCONFIG_DIR
+ if configure defines it for us (as above), then $sysconfdir,
+ then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
+
+
Sat Nov 24 13:44:21 2001 Kristian Rietveld <kristian@planet.nl>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset):
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index c6398cc4..92a7b132 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,22 @@
+2001-11-24 Manish Singh <yosh@gimp.org>
+
+ * acconfig.h
+ * configure.in: support for --with-xftconfig-dir= path to system
+ XftConfig file
+
+ * pango/pango-utils.c
+ * pango/pangox.c: include "config.h", not <config.h>
+
+ * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not
+ pangoxft-fontmap.h :)
+
+ * pango/mini-xft/minixftint.h
+ * pango/mini-xft/minixftinit.c: add code for searching common
+ locations for the XftConfig file. We search MINI_XFTCONFIG_DIR
+ if configure defines it for us (as above), then $sysconfdir,
+ then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
+
+
Sat Nov 24 13:44:21 2001 Kristian Rietveld <kristian@planet.nl>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset):
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index c6398cc4..92a7b132 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,22 @@
+2001-11-24 Manish Singh <yosh@gimp.org>
+
+ * acconfig.h
+ * configure.in: support for --with-xftconfig-dir= path to system
+ XftConfig file
+
+ * pango/pango-utils.c
+ * pango/pangox.c: include "config.h", not <config.h>
+
+ * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not
+ pangoxft-fontmap.h :)
+
+ * pango/mini-xft/minixftint.h
+ * pango/mini-xft/minixftinit.c: add code for searching common
+ locations for the XftConfig file. We search MINI_XFTCONFIG_DIR
+ if configure defines it for us (as above), then $sysconfdir,
+ then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
+
+
Sat Nov 24 13:44:21 2001 Kristian Rietveld <kristian@planet.nl>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset):
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index c6398cc4..92a7b132 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,22 @@
+2001-11-24 Manish Singh <yosh@gimp.org>
+
+ * acconfig.h
+ * configure.in: support for --with-xftconfig-dir= path to system
+ XftConfig file
+
+ * pango/pango-utils.c
+ * pango/pangox.c: include "config.h", not <config.h>
+
+ * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not
+ pangoxft-fontmap.h :)
+
+ * pango/mini-xft/minixftint.h
+ * pango/mini-xft/minixftinit.c: add code for searching common
+ locations for the XftConfig file. We search MINI_XFTCONFIG_DIR
+ if configure defines it for us (as above), then $sysconfdir,
+ then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
+
+
Sat Nov 24 13:44:21 2001 Kristian Rietveld <kristian@planet.nl>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset):
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index c6398cc4..92a7b132 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,22 @@
+2001-11-24 Manish Singh <yosh@gimp.org>
+
+ * acconfig.h
+ * configure.in: support for --with-xftconfig-dir= path to system
+ XftConfig file
+
+ * pango/pango-utils.c
+ * pango/pangox.c: include "config.h", not <config.h>
+
+ * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not
+ pangoxft-fontmap.h :)
+
+ * pango/mini-xft/minixftint.h
+ * pango/mini-xft/minixftinit.c: add code for searching common
+ locations for the XftConfig file. We search MINI_XFTCONFIG_DIR
+ if configure defines it for us (as above), then $sysconfdir,
+ then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
+
+
Sat Nov 24 13:44:21 2001 Kristian Rietveld <kristian@planet.nl>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset):
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index c6398cc4..92a7b132 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,22 @@
+2001-11-24 Manish Singh <yosh@gimp.org>
+
+ * acconfig.h
+ * configure.in: support for --with-xftconfig-dir= path to system
+ XftConfig file
+
+ * pango/pango-utils.c
+ * pango/pangox.c: include "config.h", not <config.h>
+
+ * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not
+ pangoxft-fontmap.h :)
+
+ * pango/mini-xft/minixftint.h
+ * pango/mini-xft/minixftinit.c: add code for searching common
+ locations for the XftConfig file. We search MINI_XFTCONFIG_DIR
+ if configure defines it for us (as above), then $sysconfdir,
+ then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
+
+
Sat Nov 24 13:44:21 2001 Kristian Rietveld <kristian@planet.nl>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset):
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index c6398cc4..92a7b132 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,22 @@
+2001-11-24 Manish Singh <yosh@gimp.org>
+
+ * acconfig.h
+ * configure.in: support for --with-xftconfig-dir= path to system
+ XftConfig file
+
+ * pango/pango-utils.c
+ * pango/pangox.c: include "config.h", not <config.h>
+
+ * pango/pangoxft-fontmap.c: this file is pangoxft-fontmap.c, not
+ pangoxft-fontmap.h :)
+
+ * pango/mini-xft/minixftint.h
+ * pango/mini-xft/minixftinit.c: add code for searching common
+ locations for the XftConfig file. We search MINI_XFTCONFIG_DIR
+ if configure defines it for us (as above), then $sysconfdir,
+ then (only on !_WIN32) /etc/X11 and /usr/X11R6/lib/X11.
+
+
Sat Nov 24 13:44:21 2001 Kristian Rietveld <kristian@planet.nl>
* pango/pango-fontmap.c (pango_font_map_real_load_fontset):
diff --git a/acconfig.h b/acconfig.h
index 7f052237..a54b18a8 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -17,3 +17,5 @@
#undef HAVE_FRIBIDI
#undef HAVE_UNISTD_H
#undef HAVE_FREETYPE_2_0_3
+
+#undef MINI_XFTCONFIG_DIR
diff --git a/configure.in b/configure.in
index 5807893e..f01a82bf 100644
--- a/configure.in
+++ b/configure.in
@@ -229,6 +229,15 @@ AC_SUBST(FRIBIDI_PC)
AM_CONDITIONAL(HAVE_FRIBIDI, test x$have_fribidi = xyes)
#
+# Allow setting a default path for XftConfig
+#
+AC_ARG_WITH(xftconfig-dir, [ --with-xftconfig-dir=PATH path to system XftConfig file for minixft ])
+
+if test "x$with_xftconfig_dir" != "x"; then
+ AC_DEFINE_UNQUOTED(MINI_XFTCONFIG_DIR, "$with_xftconfig_dir")
+fi
+
+#
# The OpenType test programs aren't particularly portable
#
have_varargs=no
diff --git a/pango/mini-xft/minixftinit.c b/pango/mini-xft/minixftinit.c
index 627e9ad1..c055ed34 100644
--- a/pango/mini-xft/minixftinit.c
+++ b/pango/mini-xft/minixftinit.c
@@ -24,9 +24,7 @@
#include <stdlib.h>
-#ifdef _WIN32
-#include <stdio.h>
-#endif
+#include <glib.h>
#include "minixftint.h"
@@ -43,7 +41,7 @@ MiniXftInit (char *config)
{
config = getenv ("XFT_CONFIG");
if (!config)
- config = XFT_DEFAULT_PATH;
+ config = mini_xft_get_default_path ();
}
if (MiniXftConfigLexFile (config))
{
@@ -52,22 +50,56 @@ MiniXftInit (char *config)
return True;
}
-#ifdef _WIN32
+extern char *pango_get_sysconf_subdirectory (void);
+
+#ifdef MINI_XFTCONFIG_DIR
+#define SYSCONF_INDEX 1
+#else
+#define SYSCONF_INDEX 0
+#endif
+
char *
-get_xft_default_path (void)
+mini_xft_get_default_path (void)
{
static char *result = NULL;
- extern char *pango_get_sysconf_subdirectory (void);
- char *p;
-
+ char *paths[] = {
+#ifdef MINI_XFTCONFIG_DIR
+ MINI_XFTCONFIG_DIR,
+#endif
+ NULL,
+#ifndef _WIN32
+ "/etc/X11",
+ "/usr/X11R6/lib/X11"
+#endif
+ };
+ int i;
+ gboolean found = FALSE;
+
if (result)
return result;
- p = pango_get_sysconf_subdirectory ();
- result = malloc (strlen (p) + 20);
+ paths[SYSCONF_INDEX] = g_build_path (G_DIR_SEPARATOR_S,
+ pango_get_sysconf_subdirectory (),
+ "..",
+ NULL);
- sprintf (result, "%s\\..\\XftConfig", p);
+ for (i = 0; i < (sizeof(paths) / sizeof(paths[0])); i++)
+ {
+ if (result)
+ g_free (result);
+
+ result = g_build_filename (paths[i], "XftConfig", NULL);
+
+ if (g_file_test (result, G_FILE_TEST_EXISTS))
+ {
+ found = TRUE;
+ break;
+ }
+ }
+
+ if (!found)
+ g_warning ("Could not find XftConfig file");
+ g_free (paths[SYSCONF_INDEX]);
return result;
}
-#endif
diff --git a/pango/mini-xft/minixftint.h b/pango/mini-xft/minixftint.h
index f6e75768..1884f410 100644
--- a/pango/mini-xft/minixftint.h
+++ b/pango/mini-xft/minixftint.h
@@ -58,14 +58,7 @@ extern MiniXftFontSet *_MiniXftFontSet;
#define XFT_NMISSING 256
-#ifndef XFT_DEFAULT_PATH
-#ifndef _WIN32
-#define XFT_DEFAULT_PATH "/usr/X11R6/lib/X11/XftConfig"
-#else
-extern char *get_xft_default_path (void);
-#define XFT_DEFAULT_PATH get_xft_default_path ()
-#endif
-#endif
+extern char *mini_xft_get_default_path (void);
#define XFT_DBG_OPEN 1
#define XFT_DBG_OPENV 2
diff --git a/pango/pango-utils.c b/pango/pango-utils.c
index 587a286d..7ef78746 100644
--- a/pango/pango-utils.c
+++ b/pango/pango-utils.c
@@ -24,7 +24,7 @@
#include <string.h>
#include <stdlib.h>
-#include <config.h>
+#include "config.h"
#include "pango-font.h"
#include "pango-utils.h"
diff --git a/pango/pangox.c b/pango/pangox.c
index dd16ae19..5200e6fa 100644
--- a/pango/pangox.c
+++ b/pango/pangox.c
@@ -34,7 +34,7 @@
#define PANGO_LIGATURE_HACK_DEBUG
-#include <config.h>
+#include "config.h"
#define PANGO_TYPE_X_FONT (pango_x_font_get_type ())
#define PANGO_X_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_X_FONT, PangoXFont))
diff --git a/pango/pangoxft-fontmap.c b/pango/pangoxft-fontmap.c
index 0c1d3d64..3ca383b5 100644
--- a/pango/pangoxft-fontmap.c
+++ b/pango/pangoxft-fontmap.c
@@ -1,5 +1,5 @@
/* Pango
- * pangoxft-fontmap.h: Xft font handling
+ * pangoxft-fontmap.c: Xft font handling
*
* Copyright (C) 2000 Red Hat Software
*