Skip to content

Commit e110b14

Browse files
committed
tesstrain.sh: Initialise fontconfig even if Arial isn't available
The fontconfig initialisation hardcodes using Arial. However it may not be available, whereas the fonts being used later will be, so use one of them for initialisation instead.
1 parent 422c424 commit e110b14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

training/tesstrain_utils.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ initialize_fontconfig() {
197197
local sample_path=${FONT_CONFIG_CACHE}/sample_text.txt
198198
echo "Text" >${sample_path}
199199
run_command ${TEXT2IMAGE_EXE} --fonts_dir=${FONTS_DIR} \
200-
--font="Arial" --outputbase=${sample_path} --text=${sample_path} \
200+
--font="${FONTS[0]}" --outputbase=${sample_path} --text=${sample_path} \
201201
--fontconfig_tmpdir=${FONT_CONFIG_CACHE}
202202
}
203203

0 commit comments

Comments
 (0)