'Internally used method to adjust the font size used so that the
table will fit into the available space on the page.'

def tweakFont(self, tableWidth, newFontSize, colWidths):

    adjustedWidth = ((tableWidth * newFontSize) / self.fontsize)
    if ((adjustedWidth - self.tempDoc.printable_width) < self.getAvailableMarginSpace()):
        for i in range(len(colWidths)):
            colWidths[i] *= (float(newFontSize) / float(self.fontsize))
        self.newColWidth = [colWidths]
        self.fontsize = newFontSize
        return self.tweakMargin(adjustedWidth)
    return False
