I'm trying to train a new language by following the oficial turorial but I just cannot perform the steps on "Generate Training Images and Box Files/Prepare a text file". I've created my text file but every single time I run the command text2image --text=training_text.txt --outputbase=eng.TimesNewRomanBold.exp0 --font='Times New Roman Bold' --fonts_dir=/usr/share/fonts
the result is Could not find font named Times New Roman Bold. Pango suggested font FreeSerif Bold
Please correct --font arg.:Error:Assert failed:in file text2image.cpp, line 437
Segmentation fault (core dumped)
.
This happens in the given example (I've used the one they used in the turorial) and on every single font I choose that exists in the list shown by running text2image --text=training_text.txt --outputbase=eng --fonts_dir=/usr/share/fonts --find_fonts --min_coverage=1.0 --render_per_font=false
.
Can someone help me with this? I cannot go further with the tutorial because of this...
Thanks!
After a few hours searching about this problem, I found out that what happens is that the font used in the command is not recognized by the OS and the cpp program doesn't validate this situation, therefore a Segmentation Fault
occurs.
After using a valid font, all runs smoothly.