diff --git a/src/pretix/base/pdf.py b/src/pretix/base/pdf.py index 2a0869c48d..cb7fdb3525 100644 --- a/src/pretix/base/pdf.py +++ b/src/pretix/base/pdf.py @@ -862,6 +862,10 @@ class Renderer: self._get_text_content(op, order, o) or "", ).replace("\n", "
\n").replace("-", "- ") + # reportlab does not support unicode combination characters + # It's important we do this before we use ArabicReshaper + text = unicodedata.normalize("NFKC", text) + # reportlab does not support RTL, ligature-heavy scripts like Arabic. Therefore, we use ArabicReshaper # to resolve all ligatures and python-bidi to switch RTL texts. try: @@ -869,9 +873,6 @@ class Renderer: except: logger.exception('Reshaping/Bidi fixes failed on string {}'.format(repr(text))) - # reportlab does not support unicode combination characters - text = unicodedata.normalize("NFKC", text) - p = Paragraph(text, style=style) w, h = p.wrapOn(canvas, float(o['width']) * mm, 1000 * mm) # p_size = p.wrap(float(o['width']) * mm, 1000 * mm)