SFML community forums
Help => Graphics => Topic started by: kenpower on February 17, 2023, 01:50:52 pm
-
Hi,
I'm drawing text into a window with a custom view. I'm using the view to zoom in/out. But my text is suffering terrible aliasing (thin horizontal lines are disappearing) when I zoom in. My guess is that the text is being draw on non-integer positions within the view.
What can be done to mitigate this?
Thanks
-
You really shouldn't be zooming in or out on text, instead you should adjust the text size accordingly and render the text on a separate unscaled view to the screen.
That then also allows you to ensure you're always rendering on integer positions.
Otherwise, there isn't too much you can do, as the rasterizer has to cut some information when zooming out and there's a good chance that sharp edges will visually suffer.