diff options
author | Akira TAGOH <akira@tagoh.org> | 2017-03-21 12:25:45 +0900 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2017-03-21 12:27:11 +0900 |
commit | 5ca2b1e6dcb8c7d2b4b0c19218933b10f3efd813 (patch) | |
tree | 25589136cfd573d2864197f0f6bd9f8aad84715f | |
parent | abdb6d658e1a16410dd1c964e365a3ebd5039e7c (diff) | |
download | fontconfig-5ca2b1e6dcb8c7d2b4b0c19218933b10f3efd813.tar.gz |
Update a bit for the changes in FreeType 2.7.1
Our test case relies on the outcome of the family property from freetype though,
it was changed in 2.7.1:
- PCF family names are made more `colourful'; they now include the
foundry and information whether they contain wide characters.
For example, you no longer get `Fixed' but rather `Sony Fixed'
or `Misc Fixed Wide'.
https://bugs.freedesktop.org/show_bug.cgi?id=47704
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/out271.expected | 8 | ||||
-rw-r--r-- | test/run-test.sh | 5 | ||||
-rw-r--r-- | test/run-test271.sh | 24 |
5 files changed, 48 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 8fbf3d3..bbff035 100644 --- a/configure.ac +++ b/configure.ac @@ -301,6 +301,15 @@ AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv,[Use iconv.]) PKG_CHECK_MODULES(FREETYPE, freetype2) PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2" +dnl See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT for versioning in freetype +dnl +dnl The outcome of the family property has been changed in freetype-2.7.1. +dnl Our test cases relies on it and need to update the dependency to get it success. +dnl However it isn't exactly required to run fontconfig itself. +dnl so adding another test here for compatibility. it might be simplified in the future. +PKG_CHECK_EXISTS([freetype2 >= 19.0.13], [have_freetype_2_7_1=yes], [have_freetype_2_7_1=no]) +AM_CONDITIONAL(FREETYPE_2_7_1, test "x$have_freetype_2_7_1" = xyes) + AC_SUBST(FREETYPE_LIBS) AC_SUBST(FREETYPE_CFLAGS) diff --git a/test/Makefile.am b/test/Makefile.am index 72923fa..92e92be 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -10,7 +10,11 @@ AM_TESTS_ENVIRONMENT= \ SH_LOG_COMPILER = sh +if FREETYPE_2_7_1 +TESTS=run-test271.sh +else TESTS=run-test.sh +endif TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in diff --git a/test/out271.expected b/test/out271.expected new file mode 100644 index 0000000..d069723 --- /dev/null +++ b/test/out271.expected @@ -0,0 +1,8 @@ +Misc Fixed:pixelsize=6 +Sony Fixed:pixelsize=16 += +Misc Fixed:pixelsize=6 +Sony Fixed:pixelsize=16 += +Misc Fixed:pixelsize=6 +Sony Fixed:pixelsize=16 diff --git a/test/run-test.sh b/test/run-test.sh index 97df6e5..0697f72 100644 --- a/test/run-test.sh +++ b/test/run-test.sh @@ -29,6 +29,7 @@ TESTDIR=${srcdir-"$MyPWD"} FONTDIR="$MyPWD"/fonts CACHEDIR="$MyPWD"/cache.dir +EXPECTED=${EXPECTED-"out.expected"} ECHO=true @@ -45,9 +46,9 @@ check () { echo "=" >> out $FCLIST - family pixelsize | sort >> out tr -d '\015' <out >out.tmp; mv out.tmp out - if cmp out $TESTDIR/out.expected > /dev/null ; then : ; else + if cmp out $TESTDIR/$EXPECTED > /dev/null ; then : ; else echo "*** Test failed: $TEST" - echo "*** output is in 'out', expected output in 'out.expected'" + echo "*** output is in 'out', expected output in '$EXPECTED'" exit 1 fi rm out diff --git a/test/run-test271.sh b/test/run-test271.sh new file mode 100644 index 0000000..5c85a67 --- /dev/null +++ b/test/run-test271.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# fontconfig/test/run-test271.sh +# +# Copyright © 2000 Keith Packard +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of the author(s) not be used in +# advertising or publicity pertaining to distribution of the software without +# specific, written prior permission. The authors make no +# representations about the suitability of this software for any purpose. It +# is provided "as is" without express or implied warranty. +# +# THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +# EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +# PERFORMANCE OF THIS SOFTWARE. + +EXPECTED=out271.expected sh `dirname $0`/run-test.sh |