Closed chrisjansky closed 11 months ago
nope, it seems the align
as not set while creating a attributed string inside DrawBot
will be fixed!!
for now, and I would also advise to use FormattedString
objects:
box = 100, 100, 800, 800
t = FormattedString()
t.font("Times", 100)
t.lineHeight(100 * 1.1)
t.align("center")
t += "Testing Character Bounds"
charBounds = textBoxCharacterBounds(t, box)
for b in charBounds:
fill(0, 1, 0)
rect(*b.bounds)
fill(0)
textBox(t, box)
@typemytype Understood, thanks for the quick answer, Frederik.
Hello,
a quick test of
textBoxCharacterBounds()
withalign
parameter supplied doesn’t change the output as expected.Minimal code to reproduce:
I am doing something wrong?
Thanks, Christian