Merge from HEAD:

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?)
Fix cut&paste error.
Remove CRs from the out file before comparing (needed on Windows).
Add share/doc directory. Add Fc*.3 man pages.
Move the LIBRARY and VERSION lines to the end, not to confuse libtool,
    which expects the EXPORTS line to be the first. Add FcConfigEnableHome.
Check also for DLL_EXPORT as indication of being built as a DLL on Win32.
This commit is contained in:
Tor Lillqvist 2004-03-28 23:31:31 +00:00
parent 34ead331b9
commit d48384899e
7 changed files with 69 additions and 9 deletions

View File

@ -1,3 +1,27 @@
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:

View File

@ -225,9 +225,15 @@ AC_ARG_WITH(default-fonts, [ --with-default-fonts=DIR Use fonts from D
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"

View File

@ -26,5 +26,8 @@ bin/fc-list.exe
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

View File

@ -7,7 +7,7 @@ export_symbols = -export-symbols fontconfig.def
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

View File

@ -24,7 +24,7 @@
#include "fcint.h"
#if defined (_WIN32) && defined (PIC)
#if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT))
#define STRICT
#include <windows.h>
#undef STRICT
@ -60,6 +60,31 @@ FcConfigCreate (void)
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;
@ -1355,7 +1380,7 @@ FcConfigSubstitute (FcConfig *config,
return FcConfigSubstituteWithPat (config, p, 0, kind);
}
#if defined (_WIN32) && defined (PIC)
#if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT))
static FcChar8 fontconfig_path[1000] = "";

View File

@ -1,5 +1,3 @@
LIBRARY fontconfig
VERSION @LT_CURRENT@.@LT_REVISION@
EXPORTS
FcAtomicCreate
FcAtomicDeleteNew
@ -34,6 +32,7 @@ EXPORTS
FcConfigBuildFonts
FcConfigCreate
FcConfigDestroy
FcConfigEnableHome
FcConfigFilename
FcConfigGetBlanks
FcConfigGetCache
@ -159,3 +158,5 @@ EXPORTS
FcValueEqual
FcValuePrint
FcValueSave
LIBRARY fontconfig
VERSION @LT_CURRENT@.@LT_REVISION@

View File

@ -13,6 +13,7 @@ check () {
$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'"