mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Allow plugins to declare fonts "pdf-only"
This commit is contained in:
@@ -86,9 +86,9 @@ def primary_font_kwargs():
|
||||
from pretix.presale.style import get_fonts
|
||||
|
||||
choices = [('Open Sans', 'Open Sans')]
|
||||
choices += [
|
||||
(a, {"title": a, "data": v}) for a, v in get_fonts().items()
|
||||
]
|
||||
choices += sorted([
|
||||
(a, {"title": a, "data": v}) for a, v in get_fonts().items() if not v.get('pdf_only', False)
|
||||
], key=lambda a: a[0])
|
||||
return {
|
||||
'choices': choices,
|
||||
}
|
||||
|
||||
@@ -215,7 +215,8 @@ Return a dictionaries of the following structure. Paths should be relative to st
|
||||
},
|
||||
"bolditalic": {
|
||||
...
|
||||
}
|
||||
},
|
||||
"pdf_only": False, # if True, font is not usable on the web
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user