src/reportlab/platypus/doctemplate.py
changeset 3368 afa025c34493
parent 3326 ce725978d11c
child 3374 348f9bcb4c11
--- a/src/reportlab/platypus/doctemplate.py	Wed Apr 14 12:39:46 2010 +0000
+++ b/src/reportlab/platypus/doctemplate.py	Wed Apr 14 17:13:41 2010 +0000
@@ -1144,7 +1144,7 @@
     print 'PROGRESS MONITOR:  %-10s   %d' % (typ, value)
 
 if __name__ == '__main__':
-
+    from reportlab.lib.styles import _baseFontName, _baseFontNameB
     def myFirstPage(canvas, doc):
         from reportlab.lib.colors import red
         PAGE_HEIGHT = canvas._pagesize[1]
@@ -1152,9 +1152,9 @@
         canvas.setStrokeColor(red)
         canvas.setLineWidth(5)
         canvas.line(66,72,66,PAGE_HEIGHT-72)
-        canvas.setFont('Times-Bold',24)
+        canvas.setFont(_baseFontNameB,24)
         canvas.drawString(108, PAGE_HEIGHT-108, "TABLE OF CONTENTS DEMO")
-        canvas.setFont('Times-Roman',12)
+        canvas.setFont(_baseFontName,12)
         canvas.drawString(4 * inch, 0.75 * inch, "First Page")
         canvas.restoreState()
 
@@ -1165,7 +1165,7 @@
         canvas.setStrokeColor(red)
         canvas.setLineWidth(5)
         canvas.line(66,72,66,PAGE_HEIGHT-72)
-        canvas.setFont('Times-Roman',12)
+        canvas.setFont(_baseFontName,12)
         canvas.drawString(4 * inch, 0.75 * inch, "Page %d" % doc.page)
         canvas.restoreState()