diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-07-04 08:12:05 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-07-04 16:16:35 +0200 |
commit | 1b6031423c39afba57c6d67c098ac49e1e22a303 (patch) | |
tree | 1a8ef684e7511378f02cd83f07d311273716e55e /configure.ac | |
parent | 67c20d4a02c55bd1749f7cdacd8a56df9c370d98 (diff) |
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 <glogow@fbihome.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 30 |
1 files changed, 21 insertions, 9 deletions
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.]) |