suks.ae 2022-05-26 12:29:52 +02:00 committed by Florian Festi
parent 4a339a31db
commit ec0d24efd2
2 changed files with 3 additions and 3 deletions

View File

@ -361,10 +361,10 @@ class Boxes:
self.ctx.rectangle(0, 0, self.reference, 10) self.ctx.rectangle(0, 0, self.reference, 10)
if self.reference < 40: if self.reference < 40:
self.text("%.fmm" % self.reference, self.reference + 5, 5, self.text("%.fmm" % self.reference, self.reference + 5, 5,
align="middle left") align="middle left", fontsize=8, color=Color.ETCHING)
else: else:
self.text("%.fmm" % self.reference, self.reference / 2.0, 5, self.text("%.fmm" % self.reference, self.reference / 2.0, 5,
align="middle center") align="middle center", fontsize=8, color=Color.ETCHING)
self.move(10, 10, "up") self.move(10, 10, "up")
self.ctx.stroke() self.ctx.stroke()

View File

@ -546,7 +546,7 @@ Creation date: {date}
t.text = text t.text = text
t.set("font-size", f"{params['fs']}px") t.set("font-size", f"{params['fs']}px")
t.set("text-anchor", params.get('align', 'left')) t.set("text-anchor", params.get('align', 'left'))
t.set("alignment-baseline", 'hanging') t.set("dominant-baseline", 'hanging')
else: else:
print("Unknown", c) print("Unknown", c)