Pango's opentype feature selection functions are only available
from version 1.38+, which is still quite new, so ensure it's just
ignored if using an older version.
This enables all OpenType ligatures for a specific font, where
available. Specifically, it explicitly enables the OpenType
features liga (standard ligatures), hlig (historical ligatures),
clig (contextual ligatures), and dlig (discretionary ligatures).
This feature requires Pango 1.38 or newer.
This is not strictly necessary, but recommended in the GNU autoconf manual.
No [] was added to arguments like true or false.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
# Conflicts:
# configure.ac
The different checks had set ENABLE_TRAINING unconditionally,
thus overwriting the value from the preceding checks.
So if pango and cairo were available, but icu was missing,
users would still be offered to build the training tools.
The changes for icu and has_cpp11 are not strictly necessary,
but are made here to have uniform code patterns.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
As pointed out by Stefan Weil, conditionally defining off_t using a
macro isn't a valid approach. off_t does not have a fixed size and is
used in ABI definitions (e.g. syscalls), so silently guessing its size
risks breaking the build. Additionally, all sane and modern platforms
will have off_t.
It is common practice for command line programs to print
user requested information on stdout.
This seems to be reasonable for Tesseract, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
It is common practice for command line programs to show help text
on stdout. This seems to be reasonable for Tesseract, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes a gcc warning:
ccutil/tprintf.h:31:50: warning:
format ‘%d’ expects argument of type ‘int’,
but argument 2 has type ‘tesseract::ScoredFont’ [-Wformat=]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Most command line programs print the version to stdout.
This seams to be reasonable for Tesseract, too.
Now a shell statement like "VERSION=$(tesseract --version)" works
without I/O redirection.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
As with 0c492cb, in VC14 snprintf function is provided in standard library there triggering error. "snprintf Do not define snprintf as a macro. Macro definition of snprintf conflicts with Standard Library function declaration"
Takes advantage of inheritance and dir="ltr" default to:
- only generate paragraph dirs which are not ltr
- only generate word dirs which don't match enclosing paragraph
Tested against LTR, RTL, and mixed direction files. Files for the
latter two cases are in a separate commit on the ltr-test-files branch.