Skip to content

Commit e1de637

Browse files
committed
Fix text position
With the anchor ms (middle baseline) the text is not exactly at the same position than before. I changed it to md (middle descender) to have the same position. See https://pillow.readthedocs.io/en/stable/handbook/text-anchors.html#text-anchors
1 parent 53b5235 commit e1de637

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

barcode/writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def _paint_text(self, xpos, ypos):
443443
mm2px(ypos, self.dpi),
444444
)
445445
self._draw.text(
446-
pos, subtext, font=font, fill=self.foreground, anchor="ms"
446+
pos, subtext, font=font, fill=self.foreground, anchor="md"
447447
)
448448
ypos += pt2mm(self.font_size) / 2 + self.text_line_distance
449449

0 commit comments

Comments
 (0)