configure.ac | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-)
New commits: commit 1b6031423c39afba57c6d67c098ac49e1e22a303 Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Wed Jul 4 08:12:05 2018 +0000 Add font mapping test for Linux Libertine G The vcl_fontfeature test needs a valid "Linux Libertine G" font, not a fallback font like DejaVuSans.ttf. Also fixes the test to work with spaces in font names. Change-Id: I6acad55c912c2ecab4b17ac7ab31021ad22d0cbc Reviewed-on: https://gerrit.libreoffice.org/56928 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de> diff --git a/configure.ac b/configure.ac index 3ca4d8e8ab90..bc76475962c9 100644 --- a/configure.ac +++ b/configure.ac @@ -11419,21 +11419,32 @@ TEST_FONTS_MISSING=0 test_font_map() { FONT="$1" ; shift + FONT_LOWER="$(echo "$FONT" | $AWK '{print tolower($0)}')" AC_MSG_CHECKING([font mapping for '$FONT']) FONTFILE="$(basename `$FCMATCH -f '%{file}' "$FONT"`)" - FONTFILE_LOWER="$(echo $FONTFILE | $AWK '{print tolower($0)}')" + FONTFILE_LOWER="$(echo "$FONTFILE" | $AWK '{print tolower($0)}')" - TESTEXPR="'${FONTFILE_LOWER}' = '$(echo $FONT | $AWK '{print tolower($0)}').ttf'" - while test "$#" -ge 1 ; do - MAPPING="$(echo $1 | $AWK '{print tolower($0)}')"; shift - TESTEXPR="${TESTEXPR} -o '${FONTFILE_LOWER}' = '$MAPPING-regular.ttf'" - done - if test $TESTEXPR + CURRENT_FONT_FOUND=0 + if test "${FONTFILE_LOWER}" = "${FONT_LOWER}".ttf + then + CURRENT_FONT_FOUND=1 + else + while test "$#" -ge 1 ; do + MAPPING_LOWER="$(echo "$1" | $AWK '{print tolower($0)}')"; shift + if test \( "${FONTFILE_LOWER}" = "${MAPPING_LOWER}"-regular.ttf \) -o \ + \( "${FONTFILE_LOWER}" = "${MAPPING_LOWER}".ttf \) + then + CURRENT_FONT_FOUND=1 + break + fi + done + fi + if test $CURRENT_FONT_FOUND -eq 1 then AC_MSG_RESULT([ok]) else - AC_MSG_WARN([unknown ($FONTFILE)]) - add_warning "unknown ($FONTFILE)" + AC_MSG_RESULT([unknown map '$FONTFILE']) + add_warning "unkonwn map '$FONTFILE' for '$FONT'" TEST_FONTS_MISSING=1 fi } @@ -11459,6 +11470,7 @@ else else test_font_map 'Calibri' 'Carlito' test_font_map 'DejaVuSans' 'DejaVuSans' + test_font_map 'Linux Libertine G' 'LinLibertine_R_G' if test ${TEST_FONTS_MISSING} -eq 1 then AC_MSG_WARN([Unknown font mappings - unit tests disabled.]) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits