Fix upside down glyphless font

This commit is contained in:
James R. Barlow
2023-12-23 23:44:37 -08:00
parent 0b6fb62967
commit f2714586d8
+1 -1
View File
@@ -363,7 +363,7 @@ class HocrTransform:
# If this word is 0 units wide, our best bet seems to be to suppress this text
if font_width > 0:
text.text_transform(Matrix(1, 0, 0, 1, box.llx, 0))
text.text_transform(Matrix(1, 0, 0, -1, box.llx, 0))
text.horiz_scale(100 * box.width / font_width)
text.show(elemtxt.encode('utf-16be'))