From b7d6319ebffa0713f42a23d8d0af7c1b40151e1e Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Mon, 15 Sep 2014 22:26:08 +0200 Subject: [PATCH] Fix incorrect widths of spaces between words. --- pixelocr/page.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixelocr/page.py b/pixelocr/page.py index bcef204..c621960 100644 --- a/pixelocr/page.py +++ b/pixelocr/page.py @@ -242,7 +242,7 @@ class Line(PageObject): if next_glyph is not None: distance = glyph.optical_distance(next_glyph) if distance >= min_distance: - space_after = Space(self, self.image.space(glyph.right, self.top, distance, self.height), self.baseline - self.top) + space_after = Space(self, self.image[:, glyph.right:next_glyph.left], self.baseline - self.top) yield Word(self, current_word_glyphs, space_after) current_word_glyphs = [] if current_word_glyphs: