I had the same issue in the past on Debian testing.
The cause seems to be that the test is using the "Liberation Sans" font.
By now, there is another version v2 of the Liberation fonts which seems
to behave differently from what v1 did in that test case.
As a workaround, installing the "fonts-liberation" package and
uninstalling "fonts-liberation2" made the test pass for me on Debian
@Szymon: Do you possibly have a quick idea on what the best way to deal
with this is?
(I'm asking since the test was added by your commit