Compare commits

...

20 Commits

Author SHA1 Message Date
Keith Packard f959b24d09 Update version to 2.2.3 Add release comments to INSTALL 2004-06-30 18:53:39 +00:00
Keith Packard 0d71dde9b4 Provided by: Lubos Lunak <l.lunak@suse.cz>
However FcConfigUptoDate() doesn't seem to work. See the attached patch.
    First there's an obvious misplaced parenthesis making it return always
    false, and second, even this call fails to detect font changes (e.g.
    adding a new font to /usr/X11R6/lib/X11/fonts/truetype). The patch
    should fix that as well. The problem seems to be triggered by my
    fonts.conf specifying only /usr/X11R6/lib/X11/fonts , and therefore
    config->configDirs doesn't include subdirs, unlike config->fontDirs.
2004-06-30 18:42:58 +00:00
Keith Packard 2ebc105079 Add AM_MAINTAINER_MODE 2004-04-07 18:51:57 +00:00
Keith Packard 0ede3c2fc1 Oops. Apply changes to configure.in needed to detect functions and
structures used in FcGetPixelSize.
2004-03-30 17:31:48 +00:00
Keith Packard 0b21fd7cc3 Fix --disable-doc mode code to locate built documents in ${srcdir} instead
of ${builddir}
2004-03-30 17:26:17 +00:00
Keith Packard 6f68171097 Use code from HEAD in computing pixel sizes of fonts so that vageries in
FreeType over y_ppem/height issues don't affect what pixel size values
    are used.
2004-03-30 17:17:20 +00:00
Keith Packard ad47b4480e Bug #387 - usr352@wanadoo.es (Pedro Gimeno)
Missing braces around a block of code. Correct fix was already in HEAD.
2004-03-30 17:15:00 +00:00
Tor Lillqvist d48384899e 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.
2004-03-28 23:31:31 +00:00
Keith Packard 34ead331b9 Update to version 2.2.2
Make subdir build work
Use new freetype include scheme
2004-03-10 20:42:28 +00:00
Roozbeh Pournader 6ed12fe8f8 Fixed a bug "FcStrtod" in handling some cases with two-byte decimal
separators.
2003-11-10 18:10:15 +00:00
Keith Packard 79f1aaef60 Was miscomputing end of string position for FcStrtod in locales with
multibyte separators (2.2 branch)
2003-07-09 17:04:59 +00:00
Keith Packard 339c83e11e Allow config->cache to be null (as it is when $HOME is not set) (2.2
branch)
2003-06-26 00:39:56 +00:00
Keith Packard e65f957f4e Update version number to 2.2.1 2003-06-09 18:38:08 +00:00
Keith Packard 7e26bbeb23 Update ChangeLog, prepare for 2.2.1 2003-06-09 18:36:49 +00:00
Keith Packard a6de0d3401 Apply patch from head for FcLangSetIndex to fix optimized matcher 2003-06-09 18:25:04 +00:00
Keith Packard 2fbb2ccf30 Typo in bitstream foundry name 2003-04-30 15:18:02 +00:00
Keith Packard c4d3fef747 Eliminate italic_angle check for PS fonts 2003-04-24 17:32:37 +00:00
Keith Packard a9829980e5 Fix docs to close sgml tags 2003-04-23 04:09:56 +00:00
Keith Packard 082cde02b9 Fix autogen.sh (in 2.2 branch) to work with newer versions of automake 2003-04-22 17:14:16 +00:00
Keith Packard cfb3f5309e Handle pattern elements moving during multiple edits 2003-04-22 06:29:31 +00:00
20 changed files with 395 additions and 79 deletions

126
ChangeLog
View File

@ -1,3 +1,129 @@
2004-06-30 Keith Packard <keithp@keithp.com>
* INSTALL:
* README:
* configure.in:
* fontconfig/fontconfig.h:
Update version to 2.2.3
Add release comments to INSTALL
2004-06-30 Keith Packard <keithp@keithp.com>
Provided by: Lubos Lunak <l.lunak@suse.cz>
* src/fccfg.c: (FcConfigUptoDate):
However FcConfigUptoDate() doesn't seem to work. See the attached
patch. First there's an obvious misplaced parenthesis making it
return always false, and second, even this call fails to detect font
changes (e.g. adding a new font to
/usr/X11R6/lib/X11/fonts/truetype). The patch should fix that as
well. The problem seems to be triggered by my fonts.conf specifying
only /usr/X11R6/lib/X11/fonts , and therefore config->configDirs
doesn't include subdirs, unlike config->fontDirs.
2004-04-07 Keith Packard <keithp@keithp.com>
* configure.in:
Add AM_MAINTAINER_MODE
2004-03-30 Keith Packard <keithp@keithp.com>
* configure.in:
Oops. Apply changes to configure.in needed to detect
functions and structures used in FcGetPixelSize.
2004-03-30 Keith Packard <keithp@keithp.com>
* doc/Makefile.am:
Fix --disable-doc mode code to locate built documents in ${srcdir}
instead of ${builddir}
2004-03-30 Keith Packard <keithp@keithp.com>
* src/fcfreetype.c: (FcGetPixelSize), (FcFreeTypeQuery):
Use code from HEAD in computing pixel sizes of fonts
so that vageries in FreeType over y_ppem/height issues
don't affect what pixel size values are used.
2004-03-30 Keith Packard <keithp@keithp.com>
Bug #387 - usr352@wanadoo.es (Pedro Gimeno)
* src/fcxml.c: (FcStrtod):
Missing braces around a block of code. Correct fix was
already in HEAD.
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:
* fontconfig/fontconfig.h:
* configure.in:
Update to version 2.2.2
* doc/Makefile.am:
* fc-lang/Makefile.am:
Make subdir build work
* fontconfig/fcfreetype.h:
* src/fcfreetype.c:
Use new freetype include scheme
2003-11-10 Roozbeh Pournader <roozbeh@sharif.edu>
* src/fcxml.c:
Fixed a bug "FcStrtod" in handling some cases with two-byte decimal
separators.
2003-06-09 Keith Packard <keithp@keithp.com>
* Tag version 2.2.1
* add patch from HEAD to fix optimized path in FcLangSetIndex
2003-04-30 Keith Packard <keithp@keithp.com>
* Typo in bitstream foundry name
2003-04-24 Keith Packard <keithp@keithp.com>
* Eliminate italic_angle check for PS fonts
2003-04-23 James Henstridge <james@daa.com.au>
* doc/fontconfig-devel.sgml: close the <para> element.
* doc/fcpattern.fncs: close the <para> element.
* doc/func.sgml: close the <refsynopsisdiv> element.
2003-04-22 Keith Packard <keithp@keithp.com
* Update autogen.sh to work with newer automake versions
* Handle pattern elements moving during multiple edits
2003-04-17 Colin Walters <walters@debian.org>
+ Remove some unused variables, and initialize some other ones so

25
INSTALL
View File

@ -7,3 +7,28 @@ This should generate valid Makefiles, then:
$ make
$ make install
If you're going to package fontconfig for release, there are several
important steps:
1. Update the version numbers
configure.in
fontconfig/fontconfig.h
2. Fix the README
Change version number
Set the date
3. Commit those changes
4. rebuild the configuration files with autogen.sh
sh autogen.sh --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
5. make distcheck
6. tag the tree
cvs tag fc-2_2_xx
7. Split out the ChangeLog into ChangeLog-2.2.xx with
the changes since the previous release
8. Copy ChangeLog-2.2.xx and fontconfig-2.2.xx.tar.gz to
freedesktop.org:~fontconfig/public_html/release
9. Update the Fontconfig Devel wiki page
http://freedesktop.org/Software/FontconfigDevel
10. Compute md5sums for release files:
md5sum fontconfig-2.2.xx.tar.gz ChangeLog-2.2.xx
11. Post a note to fontconfig@fontconfig.org. Include the md5sums.
gpg sign the message.

31
README
View File

@ -1,7 +1,7 @@
Fontconfig
Font configuration and customization library
Version 2.2
2003-3-1
Version 2.2.3
2004-6-30
This is the third public release of fontconfig, a font configuration and
customization library. Fontconfig is designed to locate fonts within the
@ -11,5 +11,32 @@ Fontconfig is not a rasterization library, nor does it impose a particular
rasterization library on the application. The X-specific library
'Xft' uses fontconfig along with freetype to specify and rasterize fonts.
Version 2.2.3
+ Merge Windows changes from HEAD (Tor Lillqvist)
+ Merge fix for bug #387 from HEAD (Pedro Gimeno)
+ Merge code to handle FreeType changes in y_ppem/height
+ Merge fixes for FcConfigUpToDate (Lubos Lunak)
Version 2.2.2
Update #includes for newer versions of FreeType
Version 2.2.1
Allows executable names for autotools to be specified in environment
variables.
Close some SGML tags in the documentation.
Fix a catastrophic bug in pattern editing code
Fix a typo "bitsteam" -> "bitstream"
Let FreeType compute slant for type1 fonts instead of poking at the
italic_angle value.
Fix language comparison function.
Keith Packard
keithp@keithp.com

View File

@ -9,14 +9,20 @@ cd $srcdir
PROJECT=Fontconfig
TEST_TYPE=-f
FILE=fontconfig/fontconfig.h
ACLOCAL=${ACLOCAL-aclocal}
LIBTOOLIZE=${LIBTOOLIZE-libtoolize}
AUTOMAKE=${AUTOMAKE-automake}
AUTOHEADER=${AUTOHEADER-autoheader}
AUTOCONF=${AUTOCONF-autoconf}
LIBTOOLIZE_FLAGS="--copy --force"
DIE=0
have_libtool=false
if libtool --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
libtool_version=`$LIBTOOLIZE --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
case $libtool_version in
1.4*|1.5*)
1.4*|1.5*|1.6*|1.7*|2*)
have_libtool=true
;;
esac
@ -29,7 +35,7 @@ if $have_libtool ; then : ; else
DIE=1
fi
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile $PROJECT."
echo "libtool the appropriate package for your distribution,"
@ -38,11 +44,16 @@ fi
}
have_automake=false
if automake --version < /dev/null > /dev/null 2>&1 ; then
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
need_libtoolize=true
if $AUTOMAKE --version < /dev/null > /dev/null 2>&1 ; then
automake_version=`$AUTOMAKE --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
case $automake_version in
1.2*|1.3*|1.4)
;;
1.4*)
have_automake=true
need_libtoolize=false
;;
*)
have_automake=true
;;
@ -72,16 +83,30 @@ if test -z "$AUTOGEN_SUBDIR_MODE"; then
fi
fi
aclocal $ACLOCAL_FLAGS
echo Running $ACLOCAL $ACLOCAL_FLAGS
$ACLOCAL $ACLOCAL_FLAGS
# optionally run autoheader
(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
if $AUTOHEADER --version < /dev/null > /dev/null 2>&1; then
echo Running $AUTOHEADER
$AUTOHEADER
fi
automake -a $am_opt
autoconf
case $need_libtoolize in
true)
echo Running $LIBTOOLIZE $LIBTOOLIZE_FLAGS
$LIBTOOLIZE $LIBTOOLIZE_FLAGS
;;
esac
echo Running $AUTOMAKE -a $am_opt
$AUTOMAKE -a $am_opt
echo Running $AUTOCONF
$AUTOCONF
cd $ORIGDIR
if test -z "$AUTOGEN_SUBDIR_MODE"; then
echo Running $srcdir/configure
$srcdir/configure --enable-maintainer-mode "$@"
echo

View File

@ -33,7 +33,8 @@ dnl This is the package version number, not the shared library
dnl version. This same version number must appear in fontconfig/fontconfig.h
dnl Yes, it is a pain to synchronize version numbers. Unfortunately, it's
dnl not possible to extract the version number here from fontconfig.h
AM_INIT_AUTOMAKE(fontconfig, 2.2.0)
AM_INIT_AUTOMAKE(fontconfig, 2.2.3)
AM_MAINTAINER_MODE
dnl libtool versioning
@ -117,9 +118,19 @@ AC_SUBST(FREETYPE_CFLAGS)
#
fontconfig_save_libs=$LIBS
fontconfig_save_cflags="$CFLAGS"
LIBS="$LIBS $FREETYPE_LIBS"
AC_CHECK_FUNCS(FT_Get_First_Char)
LIBS=$fontconfig_save_libs
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
AC_CHECK_FUNCS(FT_Get_First_Char FT_Get_Next_Char FT_Get_BDF_Property)
AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
HAVE_FT_BITMAP_SIZE_Y_PPEM=0,
[#include <ft2build.h>
#include FT_FREETYPE_H])
AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
[FT_Bitmap_Size structure includes y_ppem field])
CFLAGS="$fontconfig_save_cflags"
LIBS="$fontconfig_save_libs"
#
# Check expat configuration
@ -225,9 +236,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"
@ -287,8 +304,7 @@ case "$FC_ADD_FONTS" in
"")
;;
*)
FC_FONTPATH=`echo $FC_ADD_FONTS |
sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
FC_FONTPATH=`echo $FC_ADD_FONTS | sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
;;
esac
@ -320,7 +336,7 @@ AC_SUBST(CONFDIR)
# Find out what language orthographies are included
#
ORTH_FILES=`cd fc-lang && echo *.orth`
ORTH_FILES=`cd ${srcdir}/fc-lang && echo *.orth`
AC_SUBST(ORTH_FILES)
#

View File

@ -1,3 +1,4 @@
DOC_SRC = $(srcdir)
DOC_MODULE = fontconfig
DOC2HTML = docbook2html
DOC2TXT = docbook2txt
@ -7,7 +8,7 @@ TXT = fontconfig-user.txt fontconfig-devel.txt
HTML_FILES = fontconfig-user.html
HTML_DIRS = fontconfig-devel
SGML = fontconfig-user.sgml fontconfig-devel.sgml
FNCS_TMPL = func.sgml
FNCS_TMPL = ${DOC_SRC}/func.sgml
DOC_FUNCS_FNCS=\
fcatomic.fncs \
@ -97,44 +98,68 @@ if ENABLE_DOCS
.fncs.sgml:
$(RM) $@
./edit-sgml $(FNCS_TMPL) < $*.fncs > $*.sgml
./edit-sgml $(FNCS_TMPL) < '$<' > $*.sgml
.sgml.txt:
$(RM) $@
$(DOC2TXT) $*.sgml
$(DOC2TXT) $<
$(man_MANS): func.refs
func.refs: fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml
func.refs: local-fontconfig-devel.sgml $(DOC_FUNCS_SGML) version.sgml
$(RM) func.refs
$(DOC2MAN) fontconfig-devel.sgml
$(DOC2MAN) local-fontconfig-devel.sgml
mv manpage.refs func.refs
$(RM) manpage.links
$(DOC_FUNCS_SGML): edit-sgml $(FNCS_TMPL)
fonts-conf.5: fontconfig-user.sgml version.sgml
fonts-conf.5: local-fontconfig-user.sgml version.sgml
$(RM) file.refs
$(DOC2MAN) fontconfig-user.sgml
$(DOC2MAN) local-fontconfig-user.sgml
$(RM) manpage.refs manpage.links
local-fontconfig-user.sgml: fontconfig-user.sgml
$(LN_S) $< $@
all-local: $(LOCAL_DOCS)
clean-local:
$(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
$(RM) -r $(DOC_DIRS)
fontconfig-devel: fontconfig-devel.sgml $(DOCS_FUNCS_SGML) version.sgml
fontconfig-devel: local-fontconfig-devel.sgml $(DOCS_FUNCS_SGML) version.sgml
$(RM) -r fontconfig-devel
$(DOC2HTML) -o fontconfig-devel fontconfig-devel.sgml
$(DOC2HTML) -o fontconfig-devel local-fontconfig-devel.sgml
fontconfig-devel.txt: fontconfig-devel.sgml version.sgml
local-fontconfig-devel.sgml: fontconfig-devel.sgml
$(LN_S) $< $@
fontconfig-user.html: fontconfig-user.sgml version.sgml
$(DOC2HTML) -u fontconfig-user.sgml
fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml
$(RM) $@
$(DOC2TXT) local-fontconfig-devel.sgml
mv local-fontconfig-devel.txt $@
fontconfig-user.html: local-fontconfig-user.sgml version.sgml
$(RM) $@ local-$@ $@.tmp
$(DOC2HTML) -u local-fontconfig-user.sgml > $@.tmp
-test -f local-$@ && mv local-$@ $@
-test -f $@ || mv $@.tmp $@
-test -f $@.tmp && $(RM) $@.tmp
fontconfig-user.txt: local-fontconfig-user.sgml version.sgml
$(RM) $@
$(DOC2TXT) local-fontconfig-user.sgml
mv local-fontconfig-user.txt $@
CLEANFILES=confdir.sgml local-fontconfig-user.sgml local-fontconfig-devel.sgml
BUILT_DOC_DIR=.
fontconfig-user.txt: fontconfig-user.sgml version.sgml
else
BUILT_DOC_DIR=${srcdir}
all-local:
clean-local:
endif
@ -143,12 +168,13 @@ install-data-local:
$(mkinstalldirs) $(DESTDIR)$(DOCDIR)
for i in $(DOC_FILES); do \
echo '-- Installing '$$i ; \
$(INSTALL_DATA) $$i $(DESTDIR)$(DOCDIR)/$$i; \
$(INSTALL_DATA) $(BUILT_DOC_DIR)/$$i $(DESTDIR)$(DOCDIR)/$$i; \
done
for i in $(DOC_DIRS); do \
$(mkinstalldirs) $(DESTDIR)$(DOCDIR)/$$i ; \
for f in $$i/*; do \
echo '-- Installing '$$f ; \
$(INSTALL_DATA) $$f $(DESTDIR)$(DOCDIR)/$$f; \
for f in $(BUILT_DOC_DIR)/$$i/*; do \
g=`echo $$f | sed 's;$(BUILT_DOC_DIR)/;;'`; \
echo '-- Installing '$$g ; \
$(INSTALL_DATA) $$f $(DESTDIR)$(DOCDIR)/$$g; \
done \
done

View File

@ -226,6 +226,7 @@ in preference to FcPatternGet to provide compile-time typechecking.
@DESC@
Builds a pattern using a list of objects, types and values. Each
value to be entered in the pattern is specified with three arguments:
</para>
<orderedlist>
<listitem><para>
Object name, a string describing the property to be added.

View File

@ -476,6 +476,7 @@ consistent and complete version of the config file is always available.
<para>
These routines work with font files and directories, including font
directory cache files.
</para>
&fcfile;
</sect2>
<sect2><title>FcStrSet and FcStrList</title>

View File

@ -76,6 +76,7 @@
</funcprototype>
@}PROTOTYPE@
</funcsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para>
@DESC@

View File

@ -22,9 +22,10 @@
# PERFORMANCE OF THIS SOFTWARE.
#
INCLUDES=-I../src $(FREETYPE_CFLAGS)
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS)
TMPL=fclang.tmpl.h
STMPL=${top_srcdir}/fc-lang/fclang.tmpl.h
TARG=fclang.h
noinst_PROGRAMS=fc-lang
@ -37,6 +38,8 @@ ORTH=@ORTH_FILES@
EXTRA_DIST=$(TMPL) $(ORTH)
$(TARG): $(TMPL) fc-lang $(ORTH)
$(TARG): $(STMPL) fc-lang $(ORTH)
rm -f $(TARG)
./fc-lang $(ORTH) < $(TMPL) > $(TARG)
dir=`pwd`; (cd ${srcdir} && $${dir}/fc-lang $(ORTH)) < $(STMPL) > $(TARG)
CLEANFILES=$(TARG)

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

@ -24,7 +24,8 @@
#ifndef _FCFREETYPE_H_
#define _FCFREETYPE_H_
#include <freetype/freetype.h>
#include <ft2build.h>
#include FT_FREETYPE_H
FT_UInt
FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4);

View File

@ -40,7 +40,7 @@ typedef int FcBool;
#define FC_MAJOR 2
#define FC_MINOR 2
#define FC_REVISION 0
#define FC_REVISION 3
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))

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;
@ -122,9 +147,9 @@ FcConfigUptoDate (FcConfig *config)
return FcFalse;
}
config_time = FcConfigNewestFile (config->configFiles);
font_time = FcConfigNewestFile (config->configDirs);
font_time = FcConfigNewestFile (config->fontDirs);
if ((config_time.set && config_time.time - config->rescanTime > 0) ||
(font_time.set && font_time.time - config->rescanTime) > 0)
(font_time.set && (font_time.time - config->rescanTime) > 0))
{
return FcFalse;
}
@ -160,7 +185,8 @@ FcConfigDestroy (FcConfig *config)
FcStrSetDestroy (config->fontDirs);
FcStrSetDestroy (config->configFiles);
FcStrFree (config->cache);
if (config->cache)
FcStrFree (config->cache);
FcSubstDestroy (config->substPattern);
FcSubstDestroy (config->substFont);
@ -193,7 +219,8 @@ FcConfigBuildFonts (FcConfig *config)
if (!cache)
goto bail1;
FcGlobalCacheLoad (cache, config->cache);
if (config->cache)
FcGlobalCacheLoad (cache, config->cache);
list = FcConfigGetFontDirs (config);
if (!list)
@ -211,7 +238,8 @@ FcConfigBuildFonts (FcConfig *config)
if (FcDebug () & FC_DBG_FONTSET)
FcFontSetPrint (fonts);
FcGlobalCacheSave (cache, config->cache);
if (config->cache)
FcGlobalCacheSave (cache, config->cache);
FcGlobalCacheDestroy (cache);
FcConfigSetFonts (config, fonts, FcSetSystem);
@ -1232,6 +1260,14 @@ FcConfigSubstituteWithPat (FcConfig *config,
!FcStrCmpIgnoreCase ((FcChar8 *) t->field,
(FcChar8 *) e->field))
{
/*
* KLUDGE - the pattern may have been reallocated or
* things may have been inserted or deleted above
* this element by other edits. Go back and find
* the element again
*/
if (e != s->edit && st[i].elt)
st[i].elt = FcPatternFindElt (p, t->field);
if (!st[i].elt)
t = 0;
break;
@ -1344,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

@ -48,16 +48,17 @@
#include <stdio.h>
#include <string.h>
#include "fcint.h"
#include <freetype/freetype.h>
#include <freetype/internal/ftobjs.h>
#include <freetype/tttables.h>
#include <freetype/ftsnames.h>
#include <freetype/ttnameid.h>
#include <freetype/t1tables.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_OBJECTS_H
#include FT_TRUETYPE_TABLES_H
#include FT_SFNT_NAMES_H
#include FT_TRUETYPE_IDS_H
#include FT_TYPE1_TABLES_H
#if (FREETYPE_MINOR > 1 || (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 4))
#include <freetype/ftbdf.h>
#include <freetype/ftmodule.h>
#include FT_BDF_H
#include FT_MODULE_H
#define USE_FTBDF
#define HAS_BDF_PROPERTY(f) ((f) && (f)->driver && \
(f)->driver->root.clazz->get_interface)
@ -156,7 +157,7 @@ static const struct {
} FcNoticeFoundries[] = {
{ (const FcChar8*) "Bigelow", (const FcChar8 *) "b&h" },
{ (const FcChar8*) "Adobe", (const FcChar8 *) "adobe" },
{ (const FcChar8*) "Bitstream", (const FcChar8 *) "bitsteam" },
{ (const FcChar8*) "Bitstream", (const FcChar8 *) "bitstream" },
{ (const FcChar8*) "Monotype", (const FcChar8 *) "monotype" },
{ (const FcChar8*) "Linotype", (const FcChar8 *) "linotype" },
{ (const FcChar8*) "LINOTYPE-HELL", (const FcChar8 *) "linotype" },
@ -255,6 +256,26 @@ FcVendorFoundry(const char *vendor)
return 0;
}
static double
FcGetPixelSize (FT_Face face, int i)
{
#if HAVE_FT_GET_BDF_PROPERTY
if (face->num_fixed_sizes == 1)
{
BDF_PropertyRec prop;
int rc;
rc = MY_Get_BDF_Property (face, "PIXEL_SIZE", &prop);
if (rc == 0 && prop.type == BDF_PROPERTY_TYPE_INTEGER)
return (double) prop.u.integer;
}
#endif
#if HAVE_FT_BITMAP_SIZE_Y_PPEM
return (double) face->available_sizes[i].y_ppem / 64.0;
#else
return (double) face->available_sizes[i].height;
#endif
}
FcPattern *
FcFreeTypeQuery (const FcChar8 *file,
@ -769,10 +790,16 @@ FcFreeTypeQuery (const FcChar8 *file,
}
}
#if 0
/*
* Don't bother with italic_angle; FreeType already extracts that
* information for us and sticks it into style_flags
*/
if (psfontinfo.italic_angle < 0)
slant = FC_SLANT_ITALIC;
else if (psfontinfo.italic_angle >= 0)
slant = FC_SLANT_ROMAN;
#endif
if(!foundry)
foundry = FcNoticeFoundry(psfontinfo.notice);
@ -901,7 +928,7 @@ FcFreeTypeQuery (const FcChar8 *file,
{
for (i = 0; i < face->num_fixed_sizes; i++)
if (!FcPatternAddDouble (pat, FC_PIXEL_SIZE,
(double) face->available_sizes[i].height))
FcGetPixelSize (face, i)))
goto bail1;
if (!FcPatternAddBool (pat, FC_ANTIALIAS, FcFalse))
goto bail1;

View File

@ -262,6 +262,7 @@ FcLangSetIndex (const FcChar8 *lang)
int low, high, mid = 0;
int cmp = 0;
FcChar8 firstChar = FcToLower(lang[0]);
FcChar8 secondChar = firstChar ? FcToLower(lang[1]) : '\0';
if (firstChar < 'a')
{
@ -290,22 +291,14 @@ FcLangSetIndex (const FcChar8 *lang)
else
{ /* fast path for resolving 2-letter languages (by far the most common) after
* finding the first char (probably already true because of the hash table) */
FcChar8 secondChar = FcToLower(lang[1]);
if (fcLangCharSets[mid].lang[1] > secondChar) /* check second chars */
cmp = fcLangCharSets[mid].lang[1] - secondChar;
if (cmp == 0 &&
(fcLangCharSets[mid].lang[2] != '\0' ||
lang[2] != '\0'))
{
high = mid - 1;
continue;
cmp = FcStrCmpIgnoreCase(fcLangCharSets[mid].lang+2,
lang+2);
}
else if (fcLangCharSets[mid].lang[1] < secondChar)
{
low = mid + 1;
continue;
}
else if (fcLangCharSets[mid].lang[2] == '\0' && lang[2] == '\0')
return mid;
else /* identical through the first two charcters, but at least one string didn't end there */
cmp = FcStrCmpIgnoreCase(fcLangCharSets[mid].lang+2, lang+2);
}
if (cmp == 0)
return mid;

View File

@ -961,8 +961,11 @@ FcStrtod (char *s, char **end)
strcpy (buf + (dot - s) + dlen, dot + 1);
buf_end = 0;
v = strtod (buf, &buf_end);
if (buf_end)
if (buf_end) {
buf_end = s + (buf_end - buf);
if (buf_end > dot)
buf_end -= dlen - 1;
}
if (end)
*end = buf_end;
}

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'"