Scale a 2D text with TextRenderer

Hi all !

Is it possible to scale a 2d text with the TextRenderer class ? I have many texts to draw and each must have a different size. Is is possible to reduce the font size or scale the text without create a new TextRenderer instance ?

I’v tried the 3d drawing but I have some artefacts (horizontal lines across my text) when I rotate my camera and unfortunately 3d showing slows my panel.

Thanks ! bye :wink:

At this point you’ll need to create a new TextRenderer for each different font and size you want to render, if you can’t use the draw3D() methods.

OK Thanks !. I’ve tried something else, I found in sources the draw method call the draw3d method with a scaleFactor of 1. So I overloaded the TextRenderer class and the draw method with a customized scaleFactor. It works fine ! To avoid noisy pixels I set a font size of 30 and set a maximum scaleFactor of 1, so my texts could only be minimized and the visual result is quite good for now.