Skip to content

Commit

Permalink
Merge branch 'pr/pajowu/1446'
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarlow83 committed Jan 2, 2025
2 parents dd6ed4c + 74253e5 commit d87db6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ocrmypdf/hocrtransform/_hocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def _do_line_word(
space_box = Rectangle(next_box.urx, box.lly, box.llx, next_box.ury)
self._debug_draw_space_bbox(canvas, space_box)
space_width = self._font.text_width(' ', fontsize)
if space_width > 0:
if space_width > 0 and space_box.width > 0:
if text_direction == TextDirection.LTR:
text.text_transform(Matrix(1, 0, 0, -1, space_box.llx, 0))
elif text_direction == TextDirection.RTL:
Expand Down

0 comments on commit d87db6c

Please # to comment.