pdfutil: Fix TypeError in PyMuPDF font size handling

Reported by @kaia@brotka.st.
This commit is contained in:
Mia Herkt 2024-01-13 21:20:09 +01:00
parent 22d611ba39
commit e7824467f9
Signed by: mia
SSH key fingerprint: SHA256:wqxNmz1v3S4rHhF0I3z/ogVueFRUac93swSgNGfr8No

View file

@ -187,7 +187,7 @@ def mkpdf(symtab, pageblobs, colorimgs, texts, dpi):
max((bbox[1][0]*72.0)/dpi, (bbox[2][0]*72.0)/dpi),
max((bbox[2][1]*72.0)/dpi, (bbox[3][1]*72.0)/dpi)
)
fs = r.height
fs = round(r.height)
w = fitz.get_text_length(box[1], fontsize=fs)
pivot = fitz.Point(r.x0, r.y0)
matrix = fitz.Matrix(r.width/w, 1.0)