Skip to content

Commit ab7f150

Browse files
authored
Merge pull request #257 from sharkAndshark/fonts
Install ttc fonts either
2 parents bf518b2 + 8f714bf commit ab7f150

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

startup.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,14 @@ fi
9393

9494
# copy additional fonts before starting the tomcat
9595
# we also count whether at least one file with the fonts exists
96-
count=`ls -1 $ADDITIONAL_FONTS_DIR/*.ttf 2>/dev/null | wc -l`
97-
if [ -d "$ADDITIONAL_FONTS_DIR" ] && [ $count != 0 ]; then
98-
cp $ADDITIONAL_FONTS_DIR/*.ttf /usr/share/fonts/truetype/
99-
echo "Installed $count TTF font file(s) from the additional fonts folder"
96+
ttf_count=$(ls -1 "$ADDITIONAL_FONTS_DIR"/*.ttf 2>/dev/null | wc -l)
97+
ttc_count=$(ls -1 "$ADDITIONAL_FONTS_DIR"/*.ttc 2>/dev/null | wc -l)
98+
total_count=$((ttf_count + ttc_count))
99+
if [ -d "$ADDITIONAL_FONTS_DIR" ] && [ $total_count != 0 ]; then
100+
[ "$ttf_count" -gt 0 ] && cp "$ADDITIONAL_FONTS_DIR"/*.ttf /usr/share/fonts/truetype/
101+
[ "$ttc_count" -gt 0 ] && cp "$ADDITIONAL_FONTS_DIR"/*.ttc /usr/share/fonts/truetype/
102+
103+
echo "Installed $total_count ttf/ttc font file(s) from the additional fonts folder"
100104
fi
101105

102106
# configure CORS (inspired by https://github.com/oscarfonts/docker-geoserver)

0 commit comments

Comments
 (0)