do you mean something like this?
float texture_width = text.getGlobalBounds().left + text.getGlobalBounds().width + outline_thickness*2;
float texture_height = text.getGlobalBounds().top + text.getGlobalBounds().height + outline_thickness*2;
render_texture.create(texture_width, texture_height);
much better. but it still cuts a bit of the text (look below the "G" and "T")
BUT all the fonts works if i use the line
text.setPosition(outline_thickness, 0);
instead of
text.setPosition(outline_thickness, outline_thickness);
although if we don't have an explanation, it's good enough for me, as it's working