paraparser.py: fix handling of fontName attributes in span/font; version-->3.1.29
authorrobin
Thu, 07 Aug 2014 15:56:46 +0100
changeset 4129 1266500a2c22
parent 4128 309d3bc30482
child 4130 49161ce56cad
paraparser.py: fix handling of fontName attributes in span/font; version-->3.1.29
src/reportlab/__init__.py
src/reportlab/platypus/paraparser.py
--- a/src/reportlab/__init__.py	Thu Aug 07 15:54:07 2014 +0100
+++ b/src/reportlab/__init__.py	Thu Aug 07 15:56:46 2014 +0100
@@ -3,7 +3,7 @@
 #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py
 __version__=''' $Id$ '''
 __doc__="""The Reportlab PDF generation library."""
-Version = "3.1.28"
+Version = "3.1.29"
 
 import sys, os, imp
 
--- a/src/reportlab/platypus/paraparser.py	Thu Aug 07 15:54:07 2014 +0100
+++ b/src/reportlab/platypus/paraparser.py	Thu Aug 07 15:56:46 2014 +0100
@@ -774,6 +774,9 @@
         self._pop('unichar')
 
     def start_font(self,attr):
+        A = self.getAttributes(attr,_spanAttrMap)
+        if 'fontName' in A:
+            A['fontName'], A['bold'], A['italic'] = ps2tt(A['fontName'])
         self._push('font',**self.getAttributes(attr,_fontAttrMap))
 
     def end_font(self):
@@ -790,6 +793,8 @@
                 D[k] = v
             D.update(A)
             A = D
+        if 'fontName' in A:
+            A['fontName'], A['bold'], A['italic'] = ps2tt(A['fontName'])
         self._push('span',**A)
 
     def end_span(self):