src/reportlab/platypus/tables.py
changeset 3368 afa025c34493
parent 3326 ce725978d11c
child 3432 04c84c2ef968
equal deleted inserted replaced
3367:bce0159f2980 3368:afa025c34493
    17 See the test output from running this module as a script for a discussion of the method for constructing
    17 See the test output from running this module as a script for a discussion of the method for constructing
    18 tables and table styles.
    18 tables and table styles.
    19 """
    19 """
    20 from reportlab.platypus.flowables import Flowable, Preformatted
    20 from reportlab.platypus.flowables import Flowable, Preformatted
    21 from reportlab import rl_config
    21 from reportlab import rl_config
    22 from reportlab.lib.styles import PropertySet, ParagraphStyle
    22 from reportlab.lib.styles import PropertySet, ParagraphStyle, _baseFontName
    23 from reportlab.lib import colors
    23 from reportlab.lib import colors
    24 from reportlab.lib.utils import fp_str
    24 from reportlab.lib.utils import fp_str
    25 from reportlab.pdfbase.pdfmetrics import stringWidth
    25 from reportlab.pdfbase.pdfmetrics import stringWidth
    26 
    26 
    27 class CellStyle(PropertySet):
    27 class CellStyle(PropertySet):
    28     defaults = {
    28     defaults = {
    29         'fontname':'Times-Roman',
    29         'fontname':_baseFontName,
    30         'fontsize':10,
    30         'fontsize':10,
    31         'leading':12,
    31         'leading':12,
    32         'leftPadding':6,
    32         'leftPadding':6,
    33         'rightPadding':6,
    33         'rightPadding':6,
    34         'topPadding':3,
    34         'topPadding':3,
    45 LINECAPS={None: None, 'butt':0,'round':1,'projecting':2,'squared':2}
    45 LINECAPS={None: None, 'butt':0,'round':1,'projecting':2,'squared':2}
    46 LINEJOINS={None: None, 'miter':0, 'mitre':0, 'round':1,'bevel':2}
    46 LINEJOINS={None: None, 'miter':0, 'mitre':0, 'round':1,'bevel':2}
    47 
    47 
    48 # experimental replacement
    48 # experimental replacement
    49 class CellStyle1(PropertySet):
    49 class CellStyle1(PropertySet):
    50     fontname = "Times-Roman"
    50     fontname = _baseFontName
    51     fontsize = 10
    51     fontsize = 10
    52     leading = 12
    52     leading = 12
    53     leftPadding = 6
    53     leftPadding = 6
    54     rightPadding = 6
    54     rightPadding = 6
    55     topPadding = 3
    55     topPadding = 3