Skip to content

Commit

Permalink
tesstrain.sh: Only fall back to default Latin fonts if none were prov…
Browse files Browse the repository at this point in the history
…ided

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.
  • Loading branch information
nickjwhite committed Aug 26, 2015
1 parent 545a063 commit 8d0f59d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion training/language-specific.sh
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ set_lang_specific_parameters() {
local lang=$1
# The default text location is now given directly from the language code.
TEXT_CORPUS="${FLAGS_webtext_prefix}/${lang}.corpus.txt"
FONTS=( "${LATIN_FONTS[@]}" )
test -z "$FONTS" && FONTS=( "${LATIN_FONTS[@]}" )
FILTER_ARGUMENTS=""
WORDLIST2DAWG_ARGUMENTS=""
# These dawg factors represent the fraction of the corpus not covered by the
Expand Down
4 changes: 0 additions & 4 deletions training/tesstrain_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#
# USAGE: source tesstrain_utils.sh

FONTS=(
"Arial" \
"Times New Roman," \
)
if [ "$(uname)" == "Darwin" ];then
FONTS_DIR="/Library/Fonts/"
else
Expand Down

0 comments on commit 8d0f59d

Please sign in to comment.