This is all quite hacky. Many of my tests are unfortunately brittle to changes in text rendering. Fortunately there's only one test that currently requires a hacky special case (and a second test I tweaked slightly to be more robust).
I can't think of a better approach. It doesn't help to standardize the font, because version changes still come with changes to text-shaping algorithms even if the font itself is unchanged. I could base all my assertions on the widths of individual characters, but that would make the tests much less readable and not express intent as clearly. So here we are, with hopefully just a few hacky special cases (there might be a few more as LÖVE v12 advances towards publication, and in further versions).
KVJTEXMSVG43EWSARA5O52EV2D4QTQZGO5RNSPVBHYZSWUMNI25QC
I64IPGJXWRTGHHVAYJUBUIWFR4BY6NM5P7TLTV4JOD7K4BVYDECQC
GZ5WULJVEZJJQPQPSQZE7CEPIYPJ2BJDYUJBMZRA5HLOO7TE3DOQC
LF7BWEG4DKQI7NMXMZC4LC2BE5PB42HK5PD6OYBNIDMAZBJASOKQC
LXTTOB33N2HCUZFIUDRQGGBVHK2HODRG4NBLH6RXRQZDCHF27BSAC
UHB4GARJI5AB5UCDCZRFSCJNXGJSLU5DYGUGX5ITYEXI7Q43Z4CAC
ORRSP7FVCHI2TF5GXBRGQYYJAA3JFYXZBM3T663BKSBV22FCZVCAC
KKMFQDR43ZWVCDRHQLWWX3FCWCFA3ZSXYOBRJNPHUQZR2XPKWULAC
KMSL74GAMFNTAKGDKZFP2AMQXUMOC3XH373BO4IABZWBEP3YAXKAC
App.screen.check(y, 'mn', 'screen:3')
if Version == '12.0' then
-- HACK: Maybe v12.0 uses a different font? Strange that it only causes
-- issues in a couple of places.
-- We'll need to rethink our tests if issues like this start to multiply.
App.screen.check(y, 'mno ', 'screen:3')
else
App.screen.check(y, 'mn', 'screen:3')
end
App.screen.check(y, 'mn', 'screen:3')
if Version == '12.0' then
-- HACK: Maybe v12.0 uses a different font? Strange that it only causes
-- issues in a couple of places.
-- We'll need to rethink our tests if issues like this start to multiply.
App.screen.check(y, 'mno ', 'screen:3')
else
App.screen.check(y, 'mn', 'screen:3')
end