Weird text rendering when tilde (~) included in the text

That explains the results you see. There are multiple threads about using qmelt in a headless environment. Here is one: