Hi Mante!
After you change the spritefont's sprite, you need to make sure the properties properly reflect the new sprite, otherwise some weird stuff are bound to happen. Also, you need to change a few variables accordingly, at the very least, DIALOGUE_LINEHEIGHT and DIALOGUE_MARGIN should be tweaked to smaller values.
The DIALOGUE_POSITIONX variable represents the top-left corner of the dialogue box, so this value should not be set to a centered point. For the dialogue box to be centered it should be "screenwidth / 2 - DIALOGUE_WIDTH / 2".
Hope this helps !