I like title pages where the title is in an oblong (box) and the text fills it from side to side. If a line's too long, it is scaled down; if it's too short, it is scaled up, see the pictures.
I can do it by manually setting the size of individual lines, like so:
#box(
stroke: white,
width: 95%,
[
#text(size: 5.68em, hyphenate: false)[K proměnám] \
#v(0.5mm)
#text(size: 8.21em, hyphenate: false)[odborné] \
#v(1mm)
#text(size: 9.475em, hyphenate: false)[češtiny] \
#v(-4mm)
#text(size: 3.76em, hyphenate: false)[v letech 1917–2016]
]
)
The problem is that, if I change the title or the font, I'll have to do it all over again. Any ideas how to automatically scale the lines, so they fit the width of the box?