Merge pull request #1295 from emanuelschuetze/pdf-fix
PDF: Added missing 'fontName'.
This commit is contained in:
commit
38a4cf1bc3
@ -20,9 +20,12 @@ pdfmetrics.registerFont(TTFont(
|
|||||||
'Ubuntu', path_join(settings.SITE_ROOT, 'core/static/fonts/Ubuntu-R.ttf')))
|
'Ubuntu', path_join(settings.SITE_ROOT, 'core/static/fonts/Ubuntu-R.ttf')))
|
||||||
pdfmetrics.registerFont(TTFont(
|
pdfmetrics.registerFont(TTFont(
|
||||||
'Ubuntu-Bold', path_join(settings.SITE_ROOT, 'core/static/fonts/Ubuntu-B.ttf')))
|
'Ubuntu-Bold', path_join(settings.SITE_ROOT, 'core/static/fonts/Ubuntu-B.ttf')))
|
||||||
|
pdfmetrics.registerFont(TTFont(
|
||||||
|
'Ubuntu-Italic', path_join(settings.SITE_ROOT, 'core/static/fonts/Ubuntu-RI.ttf')))
|
||||||
pdfmetrics.registerFont(TTFont(
|
pdfmetrics.registerFont(TTFont(
|
||||||
'circlefont', path_join(settings.SITE_ROOT, 'core/static/fonts/circle.ttf')))
|
'circlefont', path_join(settings.SITE_ROOT, 'core/static/fonts/circle.ttf')))
|
||||||
|
|
||||||
|
pdfmetrics.registerFontFamily('Ubuntu', normal='Ubuntu', bold='Ubuntu-Bold', italic='Ubuntu-Italic')
|
||||||
|
|
||||||
# set style information
|
# set style information
|
||||||
PAGE_HEIGHT = defaultPageSize[1]
|
PAGE_HEIGHT = defaultPageSize[1]
|
||||||
@ -33,6 +36,7 @@ PAGE_WIDTH = defaultPageSize[0]
|
|||||||
stylesheet = StyleSheet1()
|
stylesheet = StyleSheet1()
|
||||||
stylesheet.add(ParagraphStyle(
|
stylesheet.add(ParagraphStyle(
|
||||||
name='Normal',
|
name='Normal',
|
||||||
|
fontName='Ubuntu',
|
||||||
fontSize=10,
|
fontSize=10,
|
||||||
leading=12,
|
leading=12,
|
||||||
))
|
))
|
||||||
|
Loading…
Reference in New Issue
Block a user