mirror of
https://github.com/pretix/pretix.git
synced 2026-10-01 19:14:43 +00:00
Fix potential infinite loop in pdf render (Z#23245937 / PRT-021)
This commit is contained in:
committed by
Raphael Michel
parent
9eaa6b0e1d
commit
c65e8835f8
@@ -1069,7 +1069,7 @@ class Renderer:
|
||||
fontsize = float(o['fontsize'])
|
||||
height = float(o['height']) * mm
|
||||
width = float(o['width']) * mm
|
||||
while True:
|
||||
for _i in range(25): # try adapting the font size at most 25 times
|
||||
p, ad, lineheight = self._text_paragraph(op, order, o, override_fontsize=fontsize)
|
||||
w, h = p.wrapOn(canvas, width, 1000 * mm)
|
||||
widths = p.getActualLineWidths0()
|
||||
|
||||
Reference in New Issue
Block a user