Code: Select all
python:
def get_size(displayable):
return (int(renpy.render(renpy.easy.displayable(displayable), 0, 0, 0, 0).get_size()[0]),
int(renpy.render(renpy.easy.displayable(displayable), 0, 0, 0, 0).get_size()[1]))
Try-and-error has brought me to an approximation of this correction IF spaces are present:
Code: Select all
correcttextx = returned_xsize + 70 + 14*textstring.count(' ')
correcttexty = returned_ysize - 21*textstring.count(' ') # <-- This is especially strange
So in conclusion, it seems that spaces make the measured x-size smaller and the measured y-size larger than it should be.