Skip to content

Commit 8d0f59d

Browse files
committed
tesstrain.sh: Only fall back to default Latin fonts if none were provided
The --fontlist argument to tesstrain.sh was always ignored, even if the language had no specific fonts specified in language-specific.sh. Change this behaviour so the --fontlist argument is used if no specifc fonts are selected by language-specific.sh.
1 parent 545a063 commit 8d0f59d

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

training/language-specific.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ set_lang_specific_parameters() {
794794
local lang=$1
795795
# The default text location is now given directly from the language code.
796796
TEXT_CORPUS="${FLAGS_webtext_prefix}/${lang}.corpus.txt"
797-
FONTS=( "${LATIN_FONTS[@]}" )
797+
test -z "$FONTS" && FONTS=( "${LATIN_FONTS[@]}" )
798798
FILTER_ARGUMENTS=""
799799
WORDLIST2DAWG_ARGUMENTS=""
800800
# These dawg factors represent the fraction of the corpus not covered by the

training/tesstrain_utils.sh

-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
#
1717
# USAGE: source tesstrain_utils.sh
1818

19-
FONTS=(
20-
"Arial" \
21-
"Times New Roman," \
22-
)
2319
if [ "$(uname)" == "Darwin" ];then
2420
FONTS_DIR="/Library/Fonts/"
2521
else

0 commit comments

Comments
 (0)