Everything works as it should. The error was on my side.
Font 24 must have texturesize 512 because Polish characters do not fit in the texture
in the same way, font 48 must be above 512
I did not catch this and that's where all the fuss is for which I'm sorry