Allow automatic leading in FONT command
authorrgbecker
Wed, 12 Jul 2000 15:36:56 +0000
changeset 361 5f3c8754279f
parent 360 f9b73082ec6e
child 362 2a124e1f58b3
Allow automatic leading in FONT command
reportlab/platypus/tables.py
--- a/reportlab/platypus/tables.py	Wed Jul 12 15:33:28 2000 +0000
+++ b/reportlab/platypus/tables.py	Wed Jul 12 15:36:56 2000 +0000
@@ -31,9 +31,12 @@
 #
 ###############################################################################
 #	$Log: tables.py,v $
+#	Revision 1.26  2000/07/12 15:36:56  rgbecker
+#	Allow automatic leading in FONT command
+#
 #	Revision 1.25  2000/07/12 15:26:46  rgbecker
 #	INNERGRID was dumb
-#
+#	
 #	Revision 1.24  2000/07/12 15:25:42  rgbecker
 #	INNERGRID was dumb
 #	
@@ -104,7 +107,7 @@
 #	Revision 1.2  2000/02/15 15:47:09  rgbecker
 #	Added license, __version__ and Logi comment
 #	
-__version__=''' $Id: tables.py,v 1.25 2000/07/12 15:26:46 rgbecker Exp $ '''
+__version__=''' $Id: tables.py,v 1.26 2000/07/12 15:36:56 rgbecker Exp $ '''
 __doc__="""
 Tables are created by passing the constructor a tuple of column widths, a tuple of row heights and the data in
 row order. Drawing of the table can be controlled by using a TableStyle instance. This allows control of the
@@ -511,8 +514,10 @@
 		new.fontname = values[0]
 		if n>1:
 			new.fontsize = values[1]
-		if n>2:
-			new.leading = values[2]
+			if n>2:
+				new.leading = values[2]
+			else:
+				new.leading = new.fontsize*1.2
 	elif op in ('FONTNAME', 'FACE'):
 		new.fontname = values[0]
 	elif op in ('SIZE', 'FONTSIZE'):