typemytype / drawbot

http://www.drawbot.com
Other
402 stars 63 forks source link

When using a FormattedString, adding tracking makes blank lines go away #469

Open justvanrossum opened 2 years ago

justvanrossum commented 2 years ago
size(1000, 400)
colWidth = 220
for track in [0, 1, 2, 3]:
    txt = FormattedString()
    txt.fontSize(30)
    txt += f"Tracking: {track}\n\n"
    txt.tracking(track)
    txt += "Text after\nblank line"
    textBox(txt, (50, 100, colWidth, 200))
    translate(colWidth, 0)
image

This doesn't happen with a regular string:

size(1000, 400)
colWidth = 220
for track in [0, 1, 2, 3]:
    txt = ""
    fontSize(30)
    txt += f"Tracking: {track}\n\n"
    tracking(track)
    txt += "Text after\nblank line"
    textBox(txt, (50, 100, colWidth, 200))
    translate(colWidth, 0)
image