Commit Graph

1174 Commits

Author SHA1 Message Date
Nick White
10243d5762 Only enable extra ligatures with recent Pango versions
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.
2016-08-21 20:48:35 +02:00
Nick White
abab5c17fd Enable all ligatures available in a font for text2image rendering
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.
2016-08-21 20:48:24 +02:00
Ian Blenke
bb00d3b5ae Dockerifying using travis build script 2016-08-21 20:48:11 +02:00
Amit Dovev
2adc116396 Replace use of TLOG_FATAL() with tprintf() and exit(1) (#349)
Asserts should not be used for missing or invalid input in the command
line! This leads to a bad UX.
2016-08-21 20:47:44 +02:00
Shreeshrii
e977af3a17 Replace asserts with tprintf() and exit(1)
Asserts should not be used for missing or invalid input in the command
line! This leads to a bad UX.
2016-08-21 20:47:33 +02:00
scottb89
0603dbc92f Bypass Leptonica error message with pixGenHalftoneMask()
Fixes #292
2016-08-21 20:47:16 +02:00
Amit Dovev
9dccc9e1df CONTRIBUTING.md: Fix a typo 2016-08-21 20:46:46 +02:00
Amit Dovev
c3de155e87 Create CONTRIBUTING.md 2016-08-21 20:46:36 +02:00
Zdenko Podobný
4fb4f4aa6b configure: Enclose most macro arguments in []
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
2016-08-21 20:44:39 +02:00
Heiko Oberdiek
4ce4aa7d67 Fix for constant kMaxDoubleSize (from 15 to 16),
which is used by method STRING::add_str_double.
2016-08-21 20:37:57 +02:00
Stefan Weil
597000841d configure: Fix check for dependencies needed for training
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>
2016-08-21 20:37:48 +02:00
Michael McConville
10511f306c Remove conditional definition of off_t
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.
2016-08-21 20:37:33 +02:00
amitdo
a38c2d8e6d Training tools: Print help message when (argv == 1) 2016-08-21 20:37:17 +02:00
Amin Cheloh
c5b86d0fdd fix invalid release year for V3.04.01 2016-08-21 20:37:02 +02:00
Zdenko Podobný
5aca90d1bc remove unused GlyphLessFont files 2016-08-21 20:36:45 +02:00
Robbert Klarenbeek
508bec7ab0 Fix incompatibility with some C++11 implementations 2016-08-21 20:36:29 +02:00
Stefan Weil
43d1fdb178 Print list of languages to stdout instead to stderr
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>
2016-08-21 20:36:16 +02:00
Stefan Weil
d52879317a Print help text to stdout instead to stderr
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>
2016-08-21 20:36:06 +02:00
Stefan Weil
f2e598f65c configure: Fix cross compiler flags for cairo and pango
Calling pkg-config directly is a bad idea because it returns
the compiler flags for native builds.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:35:49 +02:00
Zdenko Podobný
0345d07782 replace __CYGWIN32__ with __CYGWIN__ 2016-08-21 20:35:40 +02:00
Zdenko Podobný
9e65836541 fix #289 mingw64 build 2016-08-21 20:35:23 +02:00
Zdenko Podobný
0f9bf6223e add copyright to renderer.cpp and pdfr.cpp 2016-08-21 20:34:09 +02:00
Zdenko Podobný
5ab3096449 add copyright to C-API 2016-08-21 20:33:59 +02:00
Stefan Weil
ff514c5403 Add some missing format specifiers to format strings
There was a mismatch of the number of format specifiers and the number
of arguments.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:33:43 +02:00
Stefan Weil
7cc2c8f6ea Fix format string for float value
repetition_spacing is a float value.

Use %5.2 as that is used for similar float values in the same file.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:33:32 +02:00
Stefan Weil
5f0d7242d4 Fix argument for tprintf
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>
2016-08-21 20:33:23 +02:00
Stefan Weil
ce5a65f4f9 Fix format string for tprintf
The format string expected two double / int pairs, but there is only
one float and one int argument.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:33:13 +02:00
Stefan Weil
bc771fdcbd Fix arguments for tprintf
The format string expects two int arguments.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:32:58 +02:00
Stefan Weil
500db94849 Fix order of arguments for tprintf
Format string and arguments did not match.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:32:43 +02:00
Stefan Weil
fc650382cd Add missing argument for tprintf
The format string expects an int arguments.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:32:32 +02:00
Amit Dovev
950fdea9f7 Add missing % char from format specifier in tlog()
- In training/ango_font_info.cpp
2016-08-21 20:32:15 +02:00
Stefan Weil
3bad589431 Add missing argument for tprintf
The format string expects 3 int arguments.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-08-21 20:32:05 +02:00
Stefan Weil
2b8f137c8c Print version to stdout instead to stderr
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>
2016-08-21 20:31:46 +02:00
Edward Carroll
47bb8141ec Fix other instance of VS2015 compiler problem
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"
2016-08-21 20:31:29 +02:00
Zdenko Podobný
feeec2232f update ChangeLog;
remove ReleaseNotes (a relevant information are in Changelog file and there is Release note wiki online)
2016-08-21 20:31:12 +02:00
Zdenko Podobný
07e8022b72 check for pdf support in leptonica 2016-08-21 20:30:57 +02:00
Philip Rinn
f00ff67c17 Fix ABI break introduced in 3.04.00, fixes #254 2016-03-08 17:37:00 +01:00
amitdo
6f4dca803f Don't display tesseract's banner when quiet mode is active 2016-03-08 17:36:48 +01:00
Zdenko Podobný
65a42bccb3 update Release Notes (fixes #250) 2016-03-08 17:36:33 +01:00
Zdenko Podobný
285c3fba6a solve segfault for box.train; fixes #57 2016-03-08 17:36:22 +01:00
Zdenko Podobný
6385577b4c improve tesseract.pc.in - fixes #241 2016-03-08 17:36:09 +01:00
Zdenko Podobný
52e60a320e move new&delete histogramAllChannels inside the #ifdef USE_OPENCL; fixes #248 2016-03-08 17:35:48 +01:00
Tom Morris
2eec8e8747 Document hocr_font_info in config 2016-03-08 17:32:14 +01:00
Stefan Weil
a8e086d58b Fix compiler warning (signed / unsigned mismatch)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-02-18 09:08:00 +01:00
Clemens Eisserer
8c1c20e008 Initialize output parameters of word_char_quality() to zero before early exit 2016-02-18 09:07:49 +01:00
Zdenko Podobný
e4711bfcd5 increase version number in 3.04 branch 2016-02-18 09:07:34 +01:00
Tom Morris
4ef68a036c Emit fewer "lang" attributes
Add "lang" attribute to paragraph markup and only include
word lang attribute if it's different from the paragraph's value.
2016-02-18 09:05:54 +01:00
Tom Morris
381b3a56c6 Only generate dir for HOCR when needed - fixes #208
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.
2016-02-18 09:05:46 +01:00
Tom Morris
c3ad0de69b Fix varsize array for Microsoft compiler 2016-02-18 09:05:37 +01:00
Amit Dovev
473c30fa87 Update README.md 2016-02-18 09:05:04 +01:00