Compare commits
20 Commits
main
...
fc-2_2_bra
Author | SHA1 | Date |
---|---|---|
Keith Packard | f959b24d09 | |
Keith Packard | 0d71dde9b4 | |
Keith Packard | 2ebc105079 | |
Keith Packard | 0ede3c2fc1 | |
Keith Packard | 0b21fd7cc3 | |
Keith Packard | 6f68171097 | |
Keith Packard | ad47b4480e | |
Tor Lillqvist | d48384899e | |
Keith Packard | 34ead331b9 | |
Roozbeh Pournader | 6ed12fe8f8 | |
Keith Packard | 79f1aaef60 | |
Keith Packard | 339c83e11e | |
Keith Packard | e65f957f4e | |
Keith Packard | 7e26bbeb23 | |
Keith Packard | a6de0d3401 | |
Keith Packard | 2fbb2ccf30 | |
Keith Packard | c4d3fef747 | |
Keith Packard | a9829980e5 | |
Keith Packard | 082cde02b9 | |
Keith Packard | cfb3f5309e |
126
ChangeLog
126
ChangeLog
|
@ -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>
|
2003-04-17 Colin Walters <walters@debian.org>
|
||||||
|
|
||||||
+ Remove some unused variables, and initialize some other ones so
|
+ Remove some unused variables, and initialize some other ones so
|
||||||
|
|
25
INSTALL
25
INSTALL
|
@ -7,3 +7,28 @@ This should generate valid Makefiles, then:
|
||||||
$ make
|
$ make
|
||||||
$ make install
|
$ 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
31
README
|
@ -1,7 +1,7 @@
|
||||||
Fontconfig
|
Fontconfig
|
||||||
Font configuration and customization library
|
Font configuration and customization library
|
||||||
Version 2.2
|
Version 2.2.3
|
||||||
2003-3-1
|
2004-6-30
|
||||||
|
|
||||||
This is the third public release of fontconfig, a font configuration and
|
This is the third public release of fontconfig, a font configuration and
|
||||||
customization library. Fontconfig is designed to locate fonts within the
|
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
|
rasterization library on the application. The X-specific library
|
||||||
'Xft' uses fontconfig along with freetype to specify and rasterize fonts.
|
'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
|
Keith Packard
|
||||||
keithp@keithp.com
|
keithp@keithp.com
|
||||||
|
|
45
autogen.sh
45
autogen.sh
|
@ -9,14 +9,20 @@ cd $srcdir
|
||||||
PROJECT=Fontconfig
|
PROJECT=Fontconfig
|
||||||
TEST_TYPE=-f
|
TEST_TYPE=-f
|
||||||
FILE=fontconfig/fontconfig.h
|
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
|
DIE=0
|
||||||
|
|
||||||
have_libtool=false
|
have_libtool=false
|
||||||
if libtool --version < /dev/null > /dev/null 2>&1 ; then
|
if $LIBTOOLIZE --version < /dev/null > /dev/null 2>&1 ; then
|
||||||
libtool_version=`libtoolize --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
|
libtool_version=`$LIBTOOLIZE --version | sed 's/^[^0-9]*\([0-9].[0-9.]*\).*/\1/'`
|
||||||
case $libtool_version in
|
case $libtool_version in
|
||||||
1.4*|1.5*)
|
1.4*|1.5*|1.6*|1.7*|2*)
|
||||||
have_libtool=true
|
have_libtool=true
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -29,7 +35,7 @@ if $have_libtool ; then : ; else
|
||||||
DIE=1
|
DIE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
|
||||||
echo
|
echo
|
||||||
echo "You must have autoconf installed to compile $PROJECT."
|
echo "You must have autoconf installed to compile $PROJECT."
|
||||||
echo "libtool the appropriate package for your distribution,"
|
echo "libtool the appropriate package for your distribution,"
|
||||||
|
@ -38,11 +44,16 @@ fi
|
||||||
}
|
}
|
||||||
|
|
||||||
have_automake=false
|
have_automake=false
|
||||||
if automake --version < /dev/null > /dev/null 2>&1 ; then
|
need_libtoolize=true
|
||||||
automake_version=`automake --version | grep 'automake (GNU automake)' | sed 's/^[^0-9]*\(.*\)/\1/'`
|
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
|
case $automake_version in
|
||||||
1.2*|1.3*|1.4)
|
1.2*|1.3*|1.4)
|
||||||
;;
|
;;
|
||||||
|
1.4*)
|
||||||
|
have_automake=true
|
||||||
|
need_libtoolize=false
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
have_automake=true
|
have_automake=true
|
||||||
;;
|
;;
|
||||||
|
@ -72,16 +83,30 @@ if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
aclocal $ACLOCAL_FLAGS
|
echo Running $ACLOCAL $ACLOCAL_FLAGS
|
||||||
|
$ACLOCAL $ACLOCAL_FLAGS
|
||||||
|
|
||||||
# optionally run autoheader
|
# 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
|
case $need_libtoolize in
|
||||||
autoconf
|
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
|
cd $ORIGDIR
|
||||||
|
|
||||||
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
if test -z "$AUTOGEN_SUBDIR_MODE"; then
|
||||||
|
echo Running $srcdir/configure
|
||||||
$srcdir/configure --enable-maintainer-mode "$@"
|
$srcdir/configure --enable-maintainer-mode "$@"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
34
configure.in
34
configure.in
|
@ -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 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 Yes, it is a pain to synchronize version numbers. Unfortunately, it's
|
||||||
dnl not possible to extract the version number here from fontconfig.h
|
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
|
dnl libtool versioning
|
||||||
|
|
||||||
|
@ -117,9 +118,19 @@ AC_SUBST(FREETYPE_CFLAGS)
|
||||||
#
|
#
|
||||||
|
|
||||||
fontconfig_save_libs=$LIBS
|
fontconfig_save_libs=$LIBS
|
||||||
|
fontconfig_save_cflags="$CFLAGS"
|
||||||
LIBS="$LIBS $FREETYPE_LIBS"
|
LIBS="$LIBS $FREETYPE_LIBS"
|
||||||
AC_CHECK_FUNCS(FT_Get_First_Char)
|
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
|
||||||
LIBS=$fontconfig_save_libs
|
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
|
# Check expat configuration
|
||||||
|
@ -225,9 +236,15 @@ AC_ARG_WITH(default-fonts, [ --with-default-fonts=DIR Use fonts from D
|
||||||
|
|
||||||
case "$default_fonts" in
|
case "$default_fonts" in
|
||||||
yes)
|
yes)
|
||||||
FC_DEFAULT_FONTS="/usr/share/fonts"
|
if test "$os_win32" = "yes"; then
|
||||||
AC_DEFINE_UNQUOTED(FC_DEFAULT_FONTS, "/usr/share/fonts",
|
FC_DEFAULT_FONTS="WINDOWSFONTDIR"
|
||||||
[System font directory])
|
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"
|
FC_DEFAULT_FONTS="$default_fonts"
|
||||||
|
@ -287,8 +304,7 @@ case "$FC_ADD_FONTS" in
|
||||||
"")
|
"")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
FC_FONTPATH=`echo $FC_ADD_FONTS |
|
FC_FONTPATH=`echo $FC_ADD_FONTS | sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
|
||||||
sed -e 's/^/<dir>/' -e 's/$/<\/dir>/' -e 's/,/<\/dir> <dir>/g'`
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -320,7 +336,7 @@ AC_SUBST(CONFDIR)
|
||||||
# Find out what language orthographies are included
|
# 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)
|
AC_SUBST(ORTH_FILES)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
DOC_SRC = $(srcdir)
|
||||||
DOC_MODULE = fontconfig
|
DOC_MODULE = fontconfig
|
||||||
DOC2HTML = docbook2html
|
DOC2HTML = docbook2html
|
||||||
DOC2TXT = docbook2txt
|
DOC2TXT = docbook2txt
|
||||||
|
@ -7,7 +8,7 @@ TXT = fontconfig-user.txt fontconfig-devel.txt
|
||||||
HTML_FILES = fontconfig-user.html
|
HTML_FILES = fontconfig-user.html
|
||||||
HTML_DIRS = fontconfig-devel
|
HTML_DIRS = fontconfig-devel
|
||||||
SGML = fontconfig-user.sgml fontconfig-devel.sgml
|
SGML = fontconfig-user.sgml fontconfig-devel.sgml
|
||||||
FNCS_TMPL = func.sgml
|
FNCS_TMPL = ${DOC_SRC}/func.sgml
|
||||||
|
|
||||||
DOC_FUNCS_FNCS=\
|
DOC_FUNCS_FNCS=\
|
||||||
fcatomic.fncs \
|
fcatomic.fncs \
|
||||||
|
@ -97,44 +98,68 @@ if ENABLE_DOCS
|
||||||
|
|
||||||
.fncs.sgml:
|
.fncs.sgml:
|
||||||
$(RM) $@
|
$(RM) $@
|
||||||
./edit-sgml $(FNCS_TMPL) < $*.fncs > $*.sgml
|
./edit-sgml $(FNCS_TMPL) < '$<' > $*.sgml
|
||||||
|
|
||||||
.sgml.txt:
|
.sgml.txt:
|
||||||
$(RM) $@
|
$(RM) $@
|
||||||
$(DOC2TXT) $*.sgml
|
$(DOC2TXT) $<
|
||||||
|
|
||||||
$(man_MANS): func.refs
|
$(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
|
$(RM) func.refs
|
||||||
$(DOC2MAN) fontconfig-devel.sgml
|
$(DOC2MAN) local-fontconfig-devel.sgml
|
||||||
mv manpage.refs func.refs
|
mv manpage.refs func.refs
|
||||||
$(RM) manpage.links
|
$(RM) manpage.links
|
||||||
|
|
||||||
$(DOC_FUNCS_SGML): edit-sgml $(FNCS_TMPL)
|
$(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
|
$(RM) file.refs
|
||||||
$(DOC2MAN) fontconfig-user.sgml
|
$(DOC2MAN) local-fontconfig-user.sgml
|
||||||
$(RM) manpage.refs manpage.links
|
$(RM) manpage.refs manpage.links
|
||||||
|
|
||||||
|
local-fontconfig-user.sgml: fontconfig-user.sgml
|
||||||
|
$(LN_S) $< $@
|
||||||
|
|
||||||
all-local: $(LOCAL_DOCS)
|
all-local: $(LOCAL_DOCS)
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
$(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
|
$(RM) $(man_MANS) $(DOC_FILES) $(DOC_FUNCS_SGML) func.refs
|
||||||
$(RM) -r $(DOC_DIRS)
|
$(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
|
$(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
|
fontconfig-devel.txt: local-fontconfig-devel.sgml version.sgml
|
||||||
$(DOC2HTML) -u fontconfig-user.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
|
else
|
||||||
|
|
||||||
|
BUILT_DOC_DIR=${srcdir}
|
||||||
|
|
||||||
all-local:
|
all-local:
|
||||||
clean-local:
|
clean-local:
|
||||||
endif
|
endif
|
||||||
|
@ -143,12 +168,13 @@ install-data-local:
|
||||||
$(mkinstalldirs) $(DESTDIR)$(DOCDIR)
|
$(mkinstalldirs) $(DESTDIR)$(DOCDIR)
|
||||||
for i in $(DOC_FILES); do \
|
for i in $(DOC_FILES); do \
|
||||||
echo '-- Installing '$$i ; \
|
echo '-- Installing '$$i ; \
|
||||||
$(INSTALL_DATA) $$i $(DESTDIR)$(DOCDIR)/$$i; \
|
$(INSTALL_DATA) $(BUILT_DOC_DIR)/$$i $(DESTDIR)$(DOCDIR)/$$i; \
|
||||||
done
|
done
|
||||||
for i in $(DOC_DIRS); do \
|
for i in $(DOC_DIRS); do \
|
||||||
$(mkinstalldirs) $(DESTDIR)$(DOCDIR)/$$i ; \
|
$(mkinstalldirs) $(DESTDIR)$(DOCDIR)/$$i ; \
|
||||||
for f in $$i/*; do \
|
for f in $(BUILT_DOC_DIR)/$$i/*; do \
|
||||||
echo '-- Installing '$$f ; \
|
g=`echo $$f | sed 's;$(BUILT_DOC_DIR)/;;'`; \
|
||||||
$(INSTALL_DATA) $$f $(DESTDIR)$(DOCDIR)/$$f; \
|
echo '-- Installing '$$g ; \
|
||||||
|
$(INSTALL_DATA) $$f $(DESTDIR)$(DOCDIR)/$$g; \
|
||||||
done \
|
done \
|
||||||
done
|
done
|
||||||
|
|
|
@ -226,6 +226,7 @@ in preference to FcPatternGet to provide compile-time typechecking.
|
||||||
@DESC@
|
@DESC@
|
||||||
Builds a pattern using a list of objects, types and values. Each
|
Builds a pattern using a list of objects, types and values. Each
|
||||||
value to be entered in the pattern is specified with three arguments:
|
value to be entered in the pattern is specified with three arguments:
|
||||||
|
</para>
|
||||||
<orderedlist>
|
<orderedlist>
|
||||||
<listitem><para>
|
<listitem><para>
|
||||||
Object name, a string describing the property to be added.
|
Object name, a string describing the property to be added.
|
||||||
|
|
|
@ -476,6 +476,7 @@ consistent and complete version of the config file is always available.
|
||||||
<para>
|
<para>
|
||||||
These routines work with font files and directories, including font
|
These routines work with font files and directories, including font
|
||||||
directory cache files.
|
directory cache files.
|
||||||
|
</para>
|
||||||
&fcfile;
|
&fcfile;
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2><title>FcStrSet and FcStrList</title>
|
<sect2><title>FcStrSet and FcStrList</title>
|
||||||
|
|
|
@ -76,6 +76,7 @@
|
||||||
</funcprototype>
|
</funcprototype>
|
||||||
@}PROTOTYPE@
|
@}PROTOTYPE@
|
||||||
</funcsynopsis>
|
</funcsynopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
<refsect1><title>Description</title>
|
<refsect1><title>Description</title>
|
||||||
<para>
|
<para>
|
||||||
@DESC@
|
@DESC@
|
||||||
|
|
|
@ -22,9 +22,10 @@
|
||||||
# PERFORMANCE OF THIS SOFTWARE.
|
# PERFORMANCE OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
|
|
||||||
INCLUDES=-I../src $(FREETYPE_CFLAGS)
|
INCLUDES=-I${top_srcdir}/src -I${top_srcdir} $(FREETYPE_CFLAGS)
|
||||||
|
|
||||||
TMPL=fclang.tmpl.h
|
TMPL=fclang.tmpl.h
|
||||||
|
STMPL=${top_srcdir}/fc-lang/fclang.tmpl.h
|
||||||
TARG=fclang.h
|
TARG=fclang.h
|
||||||
|
|
||||||
noinst_PROGRAMS=fc-lang
|
noinst_PROGRAMS=fc-lang
|
||||||
|
@ -37,6 +38,8 @@ ORTH=@ORTH_FILES@
|
||||||
|
|
||||||
EXTRA_DIST=$(TMPL) $(ORTH)
|
EXTRA_DIST=$(TMPL) $(ORTH)
|
||||||
|
|
||||||
$(TARG): $(TMPL) fc-lang $(ORTH)
|
$(TARG): $(STMPL) fc-lang $(ORTH)
|
||||||
rm -f $(TARG)
|
rm -f $(TARG)
|
||||||
./fc-lang $(ORTH) < $(TMPL) > $(TARG)
|
dir=`pwd`; (cd ${srcdir} && $${dir}/fc-lang $(ORTH)) < $(STMPL) > $(TARG)
|
||||||
|
|
||||||
|
CLEANFILES=$(TARG)
|
||||||
|
|
|
@ -26,5 +26,8 @@ bin/fc-list.exe
|
||||||
bin/fc-cache.exe
|
bin/fc-cache.exe
|
||||||
man/man1/fc-cache.1
|
man/man1/fc-cache.1
|
||||||
man/man1/fc-list.1
|
man/man1/fc-list.1
|
||||||
man/man3/fontconfig.3
|
man/man5/fonts-conf.5
|
||||||
|
share/doc/fontconfig
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
zip $DEVZIP man/man3/Fc*.3
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
#ifndef _FCFREETYPE_H_
|
#ifndef _FCFREETYPE_H_
|
||||||
#define _FCFREETYPE_H_
|
#define _FCFREETYPE_H_
|
||||||
#include <freetype/freetype.h>
|
#include <ft2build.h>
|
||||||
|
#include FT_FREETYPE_H
|
||||||
|
|
||||||
FT_UInt
|
FT_UInt
|
||||||
FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4);
|
FcFreeTypeCharIndex (FT_Face face, FcChar32 ucs4);
|
||||||
|
|
|
@ -40,7 +40,7 @@ typedef int FcBool;
|
||||||
|
|
||||||
#define FC_MAJOR 2
|
#define FC_MAJOR 2
|
||||||
#define FC_MINOR 2
|
#define FC_MINOR 2
|
||||||
#define FC_REVISION 0
|
#define FC_REVISION 3
|
||||||
|
|
||||||
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
|
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ export_symbols = -export-symbols fontconfig.def
|
||||||
|
|
||||||
install-libtool-import-lib:
|
install-libtool-import-lib:
|
||||||
$(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir)
|
$(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:
|
uninstall-libtool-import-lib:
|
||||||
-rm $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def
|
-rm $(DESTDIR)$(libdir)/libfontconfig.dll.a $(DESTDIR)$(libdir)/fontconfig.def
|
||||||
|
|
50
src/fccfg.c
50
src/fccfg.c
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "fcint.h"
|
#include "fcint.h"
|
||||||
|
|
||||||
#if defined (_WIN32) && defined (PIC)
|
#if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT))
|
||||||
#define STRICT
|
#define STRICT
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#undef STRICT
|
#undef STRICT
|
||||||
|
@ -60,6 +60,31 @@ FcConfigCreate (void)
|
||||||
if (!FcConfigSetCache (config, (FcChar8 *) ("~/" FC_USER_CACHE_FILE)))
|
if (!FcConfigSetCache (config, (FcChar8 *) ("~/" FC_USER_CACHE_FILE)))
|
||||||
goto bail4;
|
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->blanks = 0;
|
||||||
|
|
||||||
config->substPattern = 0;
|
config->substPattern = 0;
|
||||||
|
@ -122,9 +147,9 @@ FcConfigUptoDate (FcConfig *config)
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
}
|
}
|
||||||
config_time = FcConfigNewestFile (config->configFiles);
|
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) ||
|
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;
|
return FcFalse;
|
||||||
}
|
}
|
||||||
|
@ -160,7 +185,8 @@ FcConfigDestroy (FcConfig *config)
|
||||||
FcStrSetDestroy (config->fontDirs);
|
FcStrSetDestroy (config->fontDirs);
|
||||||
FcStrSetDestroy (config->configFiles);
|
FcStrSetDestroy (config->configFiles);
|
||||||
|
|
||||||
FcStrFree (config->cache);
|
if (config->cache)
|
||||||
|
FcStrFree (config->cache);
|
||||||
|
|
||||||
FcSubstDestroy (config->substPattern);
|
FcSubstDestroy (config->substPattern);
|
||||||
FcSubstDestroy (config->substFont);
|
FcSubstDestroy (config->substFont);
|
||||||
|
@ -193,7 +219,8 @@ FcConfigBuildFonts (FcConfig *config)
|
||||||
if (!cache)
|
if (!cache)
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
||||||
FcGlobalCacheLoad (cache, config->cache);
|
if (config->cache)
|
||||||
|
FcGlobalCacheLoad (cache, config->cache);
|
||||||
|
|
||||||
list = FcConfigGetFontDirs (config);
|
list = FcConfigGetFontDirs (config);
|
||||||
if (!list)
|
if (!list)
|
||||||
|
@ -211,7 +238,8 @@ FcConfigBuildFonts (FcConfig *config)
|
||||||
if (FcDebug () & FC_DBG_FONTSET)
|
if (FcDebug () & FC_DBG_FONTSET)
|
||||||
FcFontSetPrint (fonts);
|
FcFontSetPrint (fonts);
|
||||||
|
|
||||||
FcGlobalCacheSave (cache, config->cache);
|
if (config->cache)
|
||||||
|
FcGlobalCacheSave (cache, config->cache);
|
||||||
FcGlobalCacheDestroy (cache);
|
FcGlobalCacheDestroy (cache);
|
||||||
|
|
||||||
FcConfigSetFonts (config, fonts, FcSetSystem);
|
FcConfigSetFonts (config, fonts, FcSetSystem);
|
||||||
|
@ -1232,6 +1260,14 @@ FcConfigSubstituteWithPat (FcConfig *config,
|
||||||
!FcStrCmpIgnoreCase ((FcChar8 *) t->field,
|
!FcStrCmpIgnoreCase ((FcChar8 *) t->field,
|
||||||
(FcChar8 *) e->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)
|
if (!st[i].elt)
|
||||||
t = 0;
|
t = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -1344,7 +1380,7 @@ FcConfigSubstitute (FcConfig *config,
|
||||||
return FcConfigSubstituteWithPat (config, p, 0, kind);
|
return FcConfigSubstituteWithPat (config, p, 0, kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined (_WIN32) && defined (PIC)
|
#if defined (_WIN32) && (defined (PIC) || defined (DLL_EXPORT))
|
||||||
|
|
||||||
static FcChar8 fontconfig_path[1000] = "";
|
static FcChar8 fontconfig_path[1000] = "";
|
||||||
|
|
||||||
|
|
|
@ -48,16 +48,17 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "fcint.h"
|
#include "fcint.h"
|
||||||
#include <freetype/freetype.h>
|
#include <ft2build.h>
|
||||||
#include <freetype/internal/ftobjs.h>
|
#include FT_FREETYPE_H
|
||||||
#include <freetype/tttables.h>
|
#include FT_INTERNAL_OBJECTS_H
|
||||||
#include <freetype/ftsnames.h>
|
#include FT_TRUETYPE_TABLES_H
|
||||||
#include <freetype/ttnameid.h>
|
#include FT_SFNT_NAMES_H
|
||||||
#include <freetype/t1tables.h>
|
#include FT_TRUETYPE_IDS_H
|
||||||
|
#include FT_TYPE1_TABLES_H
|
||||||
|
|
||||||
#if (FREETYPE_MINOR > 1 || (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 4))
|
#if (FREETYPE_MINOR > 1 || (FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 4))
|
||||||
#include <freetype/ftbdf.h>
|
#include FT_BDF_H
|
||||||
#include <freetype/ftmodule.h>
|
#include FT_MODULE_H
|
||||||
#define USE_FTBDF
|
#define USE_FTBDF
|
||||||
#define HAS_BDF_PROPERTY(f) ((f) && (f)->driver && \
|
#define HAS_BDF_PROPERTY(f) ((f) && (f)->driver && \
|
||||||
(f)->driver->root.clazz->get_interface)
|
(f)->driver->root.clazz->get_interface)
|
||||||
|
@ -156,7 +157,7 @@ static const struct {
|
||||||
} FcNoticeFoundries[] = {
|
} FcNoticeFoundries[] = {
|
||||||
{ (const FcChar8*) "Bigelow", (const FcChar8 *) "b&h" },
|
{ (const FcChar8*) "Bigelow", (const FcChar8 *) "b&h" },
|
||||||
{ (const FcChar8*) "Adobe", (const FcChar8 *) "adobe" },
|
{ (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*) "Monotype", (const FcChar8 *) "monotype" },
|
||||||
{ (const FcChar8*) "Linotype", (const FcChar8 *) "linotype" },
|
{ (const FcChar8*) "Linotype", (const FcChar8 *) "linotype" },
|
||||||
{ (const FcChar8*) "LINOTYPE-HELL", (const FcChar8 *) "linotype" },
|
{ (const FcChar8*) "LINOTYPE-HELL", (const FcChar8 *) "linotype" },
|
||||||
|
@ -255,6 +256,26 @@ FcVendorFoundry(const char *vendor)
|
||||||
return 0;
|
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 *
|
FcPattern *
|
||||||
FcFreeTypeQuery (const FcChar8 *file,
|
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)
|
if (psfontinfo.italic_angle < 0)
|
||||||
slant = FC_SLANT_ITALIC;
|
slant = FC_SLANT_ITALIC;
|
||||||
else if (psfontinfo.italic_angle >= 0)
|
else if (psfontinfo.italic_angle >= 0)
|
||||||
slant = FC_SLANT_ROMAN;
|
slant = FC_SLANT_ROMAN;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(!foundry)
|
if(!foundry)
|
||||||
foundry = FcNoticeFoundry(psfontinfo.notice);
|
foundry = FcNoticeFoundry(psfontinfo.notice);
|
||||||
|
@ -901,7 +928,7 @@ FcFreeTypeQuery (const FcChar8 *file,
|
||||||
{
|
{
|
||||||
for (i = 0; i < face->num_fixed_sizes; i++)
|
for (i = 0; i < face->num_fixed_sizes; i++)
|
||||||
if (!FcPatternAddDouble (pat, FC_PIXEL_SIZE,
|
if (!FcPatternAddDouble (pat, FC_PIXEL_SIZE,
|
||||||
(double) face->available_sizes[i].height))
|
FcGetPixelSize (face, i)))
|
||||||
goto bail1;
|
goto bail1;
|
||||||
if (!FcPatternAddBool (pat, FC_ANTIALIAS, FcFalse))
|
if (!FcPatternAddBool (pat, FC_ANTIALIAS, FcFalse))
|
||||||
goto bail1;
|
goto bail1;
|
||||||
|
|
21
src/fclang.c
21
src/fclang.c
|
@ -262,6 +262,7 @@ FcLangSetIndex (const FcChar8 *lang)
|
||||||
int low, high, mid = 0;
|
int low, high, mid = 0;
|
||||||
int cmp = 0;
|
int cmp = 0;
|
||||||
FcChar8 firstChar = FcToLower(lang[0]);
|
FcChar8 firstChar = FcToLower(lang[0]);
|
||||||
|
FcChar8 secondChar = firstChar ? FcToLower(lang[1]) : '\0';
|
||||||
|
|
||||||
if (firstChar < 'a')
|
if (firstChar < 'a')
|
||||||
{
|
{
|
||||||
|
@ -290,22 +291,14 @@ FcLangSetIndex (const FcChar8 *lang)
|
||||||
else
|
else
|
||||||
{ /* fast path for resolving 2-letter languages (by far the most common) after
|
{ /* 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) */
|
* finding the first char (probably already true because of the hash table) */
|
||||||
FcChar8 secondChar = FcToLower(lang[1]);
|
cmp = fcLangCharSets[mid].lang[1] - secondChar;
|
||||||
if (fcLangCharSets[mid].lang[1] > secondChar) /* check second chars */
|
if (cmp == 0 &&
|
||||||
|
(fcLangCharSets[mid].lang[2] != '\0' ||
|
||||||
|
lang[2] != '\0'))
|
||||||
{
|
{
|
||||||
high = mid - 1;
|
cmp = FcStrCmpIgnoreCase(fcLangCharSets[mid].lang+2,
|
||||||
continue;
|
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)
|
if (cmp == 0)
|
||||||
return mid;
|
return mid;
|
||||||
|
|
|
@ -961,8 +961,11 @@ FcStrtod (char *s, char **end)
|
||||||
strcpy (buf + (dot - s) + dlen, dot + 1);
|
strcpy (buf + (dot - s) + dlen, dot + 1);
|
||||||
buf_end = 0;
|
buf_end = 0;
|
||||||
v = strtod (buf, &buf_end);
|
v = strtod (buf, &buf_end);
|
||||||
if (buf_end)
|
if (buf_end) {
|
||||||
buf_end = s + (buf_end - buf);
|
buf_end = s + (buf_end - buf);
|
||||||
|
if (buf_end > dot)
|
||||||
|
buf_end -= dlen - 1;
|
||||||
|
}
|
||||||
if (end)
|
if (end)
|
||||||
*end = buf_end;
|
*end = buf_end;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
LIBRARY fontconfig
|
|
||||||
VERSION @LT_CURRENT@.@LT_REVISION@
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
FcAtomicCreate
|
FcAtomicCreate
|
||||||
FcAtomicDeleteNew
|
FcAtomicDeleteNew
|
||||||
|
@ -34,6 +32,7 @@ EXPORTS
|
||||||
FcConfigBuildFonts
|
FcConfigBuildFonts
|
||||||
FcConfigCreate
|
FcConfigCreate
|
||||||
FcConfigDestroy
|
FcConfigDestroy
|
||||||
|
FcConfigEnableHome
|
||||||
FcConfigFilename
|
FcConfigFilename
|
||||||
FcConfigGetBlanks
|
FcConfigGetBlanks
|
||||||
FcConfigGetCache
|
FcConfigGetCache
|
||||||
|
@ -159,3 +158,5 @@ EXPORTS
|
||||||
FcValueEqual
|
FcValueEqual
|
||||||
FcValuePrint
|
FcValuePrint
|
||||||
FcValueSave
|
FcValueSave
|
||||||
|
LIBRARY fontconfig
|
||||||
|
VERSION @LT_CURRENT@.@LT_REVISION@
|
||||||
|
|
|
@ -13,6 +13,7 @@ check () {
|
||||||
$FCLIST - family pixelsize | sort >> out
|
$FCLIST - family pixelsize | sort >> out
|
||||||
echo "=" >> out
|
echo "=" >> out
|
||||||
$FCLIST - family pixelsize | sort >> 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
|
if cmp out out.expected > /dev/null ; then : ; else
|
||||||
echo "*** Test failed: $TEST"
|
echo "*** Test failed: $TEST"
|
||||||
echo "*** output is in 'out', expected output in 'out.expected'"
|
echo "*** output is in 'out', expected output in 'out.expected'"
|
||||||
|
|
Loading…
Reference in New Issue