Commit Graph

11 Commits

Author SHA1 Message Date
Nick White
d31ffc292f Use mktemp to create workspace directory
mktemp is a better idea for security, as well as enabling users to
specify a different directory using the TMPDIR environment variable,
which is useful if /tmp is a small tmpfs.

Also fix a bug where the first few log messages were failing as the
workspace directory wasn't been created early enough.
2016-02-05 10:51:43 +01:00
Nick White
143ef735a4 Add --exposures option to tesstrain.sh
This flag can be used to specify multiple different exposure levels
for a training. There was some code already in tesstrain_utils.sh
to deal with multiple exposure levels, so it looks like this
functionality was always intended.

The default usage does not change, with exposure level 0 being the
only one used if --exposures is not used.
2016-02-05 10:51:34 +01:00
Nick White
45590ba1c1 Remove --bin_dir option from tesstrain.sh (should use $PATH instead)
The --bin_dir option to tesstrain.sh is not useful, as $PATH does the
same job much better, so switch to relying on that instead.

This also makes the code a bit more readable, as it removes the need
to refer to binaries as COMMAND_NAME_EXE rather than just command_name.
2016-02-05 10:51:23 +01:00
Nick White
b581c33789 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.
2016-02-05 10:51:14 +01:00
Nick White
caab05b0bb 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.
2016-02-05 10:50:54 +01:00
Zdenko Podobný
bf3f125ad5 change links from code.google.com to github.com 2015-07-11 09:43:31 +02:00
Ray Smith
19c26f0646 Removed warning about ligatures and fixed root font dir 2015-07-10 15:56:33 -07:00
Ray Smith
a303ab9d00 Misc fixes, mostly clang formatting, but some bug fixes in matrix, werd, and tesstrain_utils. Also updates unicharset to match traineddata files. 2015-07-09 14:28:20 -07:00
Ray Smith
4c7ab0caea Fixed font lists, improved wordlist management 2015-06-12 10:56:40 -07:00
Jim O'Regan
16ac3b0a20 /usr/share/fonts is the wrong path on Mac 2015-05-18 09:53:14 +01:00
Ray Smith
6be25156f7 Major updates to training system as a result of extensive testing on 100 languages 2015-05-12 18:04:31 -07:00