File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -868,6 +868,8 @@ VERTICAL_FONTS=( \
868
868
" Baekmuk Batang Patched" \ # for kor
869
869
)
870
870
871
+ FLAGS_webtext_prefix=${FLAGS_webtext_prefix:- }
872
+
871
873
# Set language-specific values for several global variables, including
872
874
# ${TEXT_CORPUS}
873
875
# holds the text corpus file for the language, used in phase F
@@ -1164,16 +1166,16 @@ set_lang_specific_parameters() {
1164
1166
1165
1167
* ) err_exit " Error: ${lang} is not a valid language code"
1166
1168
esac
1167
- if [[ ${FLAGS_mean_count} -gt 0 ]]; then
1169
+ if [[ ${FLAGS_mean_count:- } -gt 0 ]]; then
1168
1170
TRAINING_DATA_ARGUMENTS+=" --mean_count=${FLAGS_mean_count} "
1169
- elif [[ ! -z ${MEAN_COUNT} ]]; then
1171
+ elif [[ ! -z ${MEAN_COUNT:- } ]]; then
1170
1172
TRAINING_DATA_ARGUMENTS+=" --mean_count=${MEAN_COUNT} "
1171
1173
fi
1172
1174
# Default to Latin fonts if none have been set
1173
1175
test -z " $FONTS " && FONTS=( " ${LATIN_FONTS[@]} " )
1174
1176
1175
1177
# Default to 0 exposure if it hasn't been set
1176
- test -z " $EXPOSURES " && EXPOSURES=0
1178
+ test -z " ${ EXPOSURES:- } " && EXPOSURES=0
1177
1179
# Set right-to-left and normalization mode.
1178
1180
case " ${LANG_CODE} " in
1179
1181
ara | div| fas | pus | snd | syr | uig | urd | kur_ara | heb | yid )
Original file line number Diff line number Diff line change @@ -259,7 +259,7 @@ generate_font_image() {
259
259
done
260
260
261
261
run_command text2image ${common_args} --font=" ${font} " \
262
- --text=${TRAINING_TEXT} ${TEXT2IMAGE_EXTRA_ARGS}
262
+ --text=${TRAINING_TEXT} ${TEXT2IMAGE_EXTRA_ARGS:- }
263
263
check_file_readable ${outbase} .box ${outbase} .tif
264
264
265
265
if (( EXTRACT_FONT_PROPERTIES)) &&
You can’t perform that action at this time.
0 commit comments