Commit 5ca2b1e6 authored by Akira TAGOH's avatar Akira TAGOH

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
parent abdb6d65
......@@ -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)
......
......@@ -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
......
Misc Fixed:pixelsize=6
Sony Fixed:pixelsize=16
=
Misc Fixed:pixelsize=6
Sony Fixed:pixelsize=16
=
Misc Fixed:pixelsize=6
Sony Fixed:pixelsize=16
......@@ -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
......
#!/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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment