rst2odp icon indicating copy to clipboard operation
rst2odp copied to clipboard

font selection doesn't work

Open mcepl opened this issue 6 years ago • 0 comments

I have two questions. First of all, what about this one (using rst2odp 0.3.1):

matej@mitmanek: PyCon18-m2crypto (master *%)$ rst2odp --traceback --template-file=urania_black.otp --font='Urania Czech' --mono-font=Incosonlata slides.rst slides.odp
Traceback (most recent call last):
  File "/home/matej/.local/bin/rst2odp", line 1308, in <module>
    sys.exit(main(sys.argv) or 0)
  File "/home/matej/.local/bin/rst2odp", line 1297, in main
    enable_exit_status=enable_exit_status)
  File "/usr/lib/python3.4/site-packages/docutils/core.py", line 219, in publish
    output = self.writer.write(self.document, self.destination)
  File "/usr/lib/python3.4/site-packages/docutils/writers/__init__.py", line 80, in write
    self.translate()
  File "/home/matej/.local/bin/rst2odp", line 212, in translate
    self.parts['whole'] = self.visitor.get_whole()
  File "/home/matej/.local/bin/rst2odp", line 280, in get_whole
    return self.preso.get_data(self.settings.template_file)
  File "/home/matej/.local/lib/python3.4/site-packages/odplib/preso.py", line 358, in get_data
    self.add_otp_style(zip_odp, style_file)
  File "/home/matej/.local/lib/python3.4/site-packages/odplib/preso.py", line 384, in add_otp_style
    xml_data = self.override_styles(xml_data)
  File "/home/matej/.local/lib/python3.4/site-packages/odplib/preso.py", line 461, in override_styles
    u'fo:font-family="%s"' %NORMAL_FONT)
TypeError: 'str' does not support the buffer interface
matej@mitmanek: PyCon18-m2crypto (master *%)$

And the second, what is the name of the relevant section in docutils.cnf? [odf_odp writer]?

mcepl avatar Jun 01 '18 14:06 mcepl