diff --git a/src/pretix/base/pdf.py b/src/pretix/base/pdf.py index cb2d946168..05055e5e44 100644 --- a/src/pretix/base/pdf.py +++ b/src/pretix/base/pdf.py @@ -935,10 +935,6 @@ class Renderer: def _draw_textarea(self, canvas: Canvas, op: OrderPosition, order: Order, o: dict): font = o['fontfamily'] - if o['bold']: - font += ' B' - if o['italic']: - font += ' I' # Since pdfmetrics.registerFont is global, we want to make sure that no one tries to sneak in a font, they # should not have access to. @@ -946,6 +942,11 @@ class Renderer: logger.warning(f'Unauthorized use of font "{font}"') font = 'Open Sans' + if o['bold']: + font += ' B' + if o['italic']: + font += ' I' + try: ad = getAscentDescent(font, float(o['fontsize'])) except KeyError: # font not known, fall back