+2004-03-28 Tor Lillqvist <tml@iki.fi>
+
+ Merge from HEAD:
+
+ * src/fccfg.c (FcConfigCreate): If FcConfigHome() is NULL, use the
+ temp folder. (I guess this branch doesn't crash on a NULL
+ config->cache, but still a good idea to have a cache file, for
+ performance, isn't it?)
+
+ * src/Makefile.am (install-libtool-import-lib): Fix cut&paste error.
+
+ * test/run-test.sh: Remove CRs from the out file before comparing
+ (needed on Windows).
+
+ * fontconfig-zip.in (DEVZIP): Add share/doc directory. Add Fc*.3
+ man pages.
+
+ * src/fontconfig.def.in: Move the LIBRARY and VERSION lines to the
+ end, not to confuse libtool, which expects the EXPORTS line to be
+ the first. Add FcConfigEnableHome.
+
+ * src/fccfg.c: Check also for DLL_EXPORT as indication of being
+ built as a DLL on Win32.
+
2004-03-10 Keith Packard <keithp@keithp.com>
* README:
case "$default_fonts" in
yes)
- FC_DEFAULT_FONTS="/usr/share/fonts"
- AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts",
- [System font directory])
+ if test "$os_win32" = "yes"; then
+ FC_DEFAULT_FONTS="WINDOWSFONTDIR"
+ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "WINDOWSFONTDIR",
+ [Windows font directory])
+ else
+ FC_DEFAULT_FONTS="/usr/share/fonts"
+ AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts",
+ [System font directory])
+ fi
;;
*)
FC_DEFAULT_FONTS="$default_fonts"
bin/fc-cache.exe
man/man1/fc-cache.1
man/man1/fc-list.1
-man/man3/fontconfig.3
+man/man5/fonts-conf.5
+share/doc/fontconfig
EOF
+
+zip $DEVZIP man/man3/Fc*.3
install-libtool-import-lib:
$(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
- $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/glib-2.0.def
+ $(INSTALL) fontconfig.def $(DESTDIR)$(libdir)/fontconfig.def
uninstall-libtool-import-lib:
-rm $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def
#include "fcint.h"
-#if defined (_WIN32) && defined (PIC)
+#if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT))
#define STRICT
#include <windows.h>
#undef STRICT
if (!FcConfigSetCache (config, (FcChar8 *) ("~/" FC_USER_CACHE_FILE)))
goto bail4;
+#ifdef _WIN32
+ if (config->cache == 0)
+ {
+ /* If no home, use the temp folder. */
+ FcChar8 dummy[1];
+ int templen = GetTempPath (1, dummy);
+ FcChar8 *temp = malloc (templen + 1);
+
+ if (temp)
+ {
+ FcChar8 *cache_dir;
+
+ GetTempPath (templen + 1, temp);
+ cache_dir = FcStrPlus (temp, FC_USER_CACHE_FILE);
+ free (temp);
+ if (!FcConfigSetCache (config, cache_dir))
+ {
+ FcStrFree (cache_dir);
+ goto bail4;
+ }
+ FcStrFree (cache_dir);
+ }
+ }
+#endif
+
config->blanks = 0;
config->substPattern = 0;
return FcConfigSubstituteWithPat (config, p, 0, kind);
}
-#if defined (_WIN32) && defined (PIC)
+#if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT))
static FcChar8 fontconfig_path[1000] = "";
-LIBRARY fontconfig
-VERSION @LT_CURRENT@.@LT_REVISION@
EXPORTS
FcAtomicCreate
FcAtomicDeleteNew
FcConfigBuildFonts
FcConfigCreate
FcConfigDestroy
+ FcConfigEnableHome
FcConfigFilename
FcConfigGetBlanks
FcConfigGetCache
FcValueEqual
FcValuePrint
FcValueSave
+LIBRARY fontconfig
+VERSION @LT_CURRENT@.@LT_REVISION@
$FCLIST - family pixelsize | sort >> out
echo "=" >> out
$FCLIST - family pixelsize | sort >> out
+ tr -d '\015' <out >out.tmp; mv out.tmp out
if cmp out out.expected > /dev/null ; then : ; else
echo "*** Test failed: $TEST"
echo "*** output is in 'out', expected output in 'out.expected'"