mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +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
|
from pretix.presale.style import get_fonts
|
||||||
|
|
||||||
choices = [('Open Sans', 'Open Sans')]
|
choices = [('Open Sans', 'Open Sans')]
|
||||||
choices += [
|
choices += sorted([
|
||||||
(a, {"title": a, "data": v}) for a, v in get_fonts().items()
|
(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 {
|
return {
|
||||||
'choices': choices,
|
'choices': choices,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,8 @@ Return a dictionaries of the following structure. Paths should be relative to st
|
|||||||
},
|
},
|
||||||
"bolditalic": {
|
"bolditalic": {
|
||||||
...
|
...
|
||||||
}
|
},
|
||||||
|
"pdf_only": False, # if True, font is not usable on the web
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user