thanks for clarifying.
one thing that made me wonder when reading the unconventional UPM of 550: might this be related to this bug: https://github.com/typemytype/drawbot/issues/555#issuecomment-1948050444.
as @monomonnik suggests I also tried a simpler script with Mutator Sans and I think this does what you expect?
txt = 'lestextessociologiques'.upper()
fnt = 'MutatorSans.ttf'
fnt_s = 24
lh = 32
lh_shift = -3
rows = 11
newPage('A4')
txt_l = len(txt)
fstr = FormattedString(fontSize = fnt_s, font = fnt)
for r_i in range(rows):
for t_i in range(txt_l):
fstr.append(txt[(t_i + r_i)%txt_l], font = fnt, fontSize = fnt_s, lineHeight = lh, fontVariations={'wght': 1000/rows * r_i, 'wdth': 1000/txt_l*t_i})
fstr.append('\n')
lh += lh_shift if r_i < rows/2 else -lh_shift
text(fstr, (20, height() - 100))
otherwise just using a text() for each line might me a way?
txt = 'lestextessociologiques'.upper()
fnt = '/Users/jo/Desktop/MutatorSans.ttf'
fnt_s = 24
lh = 50
lh_shift = -3
rows = 11
newPage('A4')
txt_l = len(txt)
y = height() - 100
for r_i in range(rows):
fstr = FormattedString(fontSize = fnt_s, font = fnt)
for t_i in range(txt_l):
fstr.append(txt[(t_i + r_i)%txt_l], font = fnt, fontSize = fnt_s, fontVariations={'wght': 1000/rows * r_i, 'wdth': 1000/txt_l*t_i})
text(fstr, (10, y))
lh += lh_shift if r_i < rows/2 else -lh_shift
y -= lh