Commit 53f2c088 authored by Jérome Perrin's avatar Jérome Perrin

X

parent e01f0743
...@@ -51,7 +51,6 @@ def normalizeFontName(font_name): ...@@ -51,7 +51,6 @@ def normalizeFontName(font_name):
if font_name.startswith('/'): if font_name.startswith('/'):
return font_name[1:] return font_name[1:]
def getReferencedFonts(pdf_file_reader): def getReferencedFonts(pdf_file_reader):
"""Return fonts referenced in this pdf """Return fonts referenced in this pdf
""" """
...@@ -113,7 +112,7 @@ class HTMLtoPDFConversionFontTestMixin: ...@@ -113,7 +112,7 @@ class HTMLtoPDFConversionFontTestMixin:
'''.format(**locals()) '''.format(**locals())
pdf_data = self._convert_html_to_pdf(src_html) pdf_data = self._convert_html_to_pdf(src_html)
with open('data/after_{}_{}.pdf'.format(self.id(), font), 'wb') as f: with open('data/before_{}_{}.pdf'.format(self.id(), font), 'wb') as f:
f.write(pdf_data) f.write(pdf_data)
pdf_reader = PyPDF2.PdfFileReader(io.BytesIO((pdf_data))) pdf_reader = PyPDF2.PdfFileReader(io.BytesIO((pdf_data)))
self.assertEqual( self.assertEqual(
...@@ -160,7 +159,7 @@ class TestWkhtmlToPDF(HTMLtoPDFConversionFontTestMixin, CloudOooTestCase): ...@@ -160,7 +159,7 @@ class TestWkhtmlToPDF(HTMLtoPDFConversionFontTestMixin, CloudOooTestCase):
'Liberation Sans Narrow': 'LiberationSansNarrow', 'Liberation Sans Narrow': 'LiberationSansNarrow',
'Liberation Serif': 'LiberationSerif', 'Liberation Serif': 'LiberationSerif',
'Linux LibertineG': 'LiberationSans', 'Linux LibertineG': 'LiberationSans',
'OpenSymbol': set(['DejaVuSans', 'OpenSymbol']), 'OpenSymbol': set(['DejaVuSans', 'OpenSymbol']), # XXX why ??
'Palatino': 'LiberationSans', 'Palatino': 'LiberationSans',
'Roboto Black': 'LiberationSans', 'Roboto Black': 'LiberationSans',
'Roboto Condensed Light': 'LiberationSans', 'Roboto Condensed Light': 'LiberationSans',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment