diff --git a/barcode/writer.py b/barcode/writer.py index b63e5ea..779f928 100755 --- a/barcode/writer.py +++ b/barcode/writer.py @@ -126,9 +126,7 @@ def calculate_size(self, modules_per_line, number_of_lines): ) number_of_text_lines = len(self.text.splitlines()) if self.font_size and self.text: - height += ( - pt2mm(self.font_size) / 2 * number_of_text_lines + self.text_distance - ) + height += pt2mm(self.font_size) * number_of_text_lines + self.text_distance height += self.text_line_distance * (number_of_text_lines - 1) return width, height @@ -284,7 +282,7 @@ def render(self, code): # Split the ean into its blocks self.text = self.text.split(" ") - ypos += pt2mm(self.font_size) + ypos += pt2mm(self.font_size) + self.text_distance blocks = self.text for text_, xpos in zip(blocks, text["xpos"]):