SDL icon indicating copy to clipboard operation
SDL copied to clipboard

render: use nearest pixel scaling for debug text

Open marcin-serwin opened this issue 1 year ago • 3 comments

Description

The debug text font is less legible when scaled linearly.

Before:

2024-11-17T20:24:12

Afer:

2024-11-17T20:23:46

marcin-serwin avatar Nov 17 '24 19:11 marcin-serwin

However it is less legible when scaled to 1.5. Maybe we should check the scaling factor instead of unconditionally setting one or the other?

slouken avatar Nov 17 '24 20:11 slouken

However it is less legible when scaled to 1.5.

In my opinion 1.5 looks decent. Of the factors below, 1.2 and those below 1 seem to be a bit worse than the linear version but it's still legible.

Maybe we should check the scaling factor instead of unconditionally setting one or the other?

Not sure if it's worth doing. What would be a good condition in your opinion?

2024-11-17T21:18:16

2024-11-17T21:18:29

marcin-serwin avatar Nov 17 '24 20:11 marcin-serwin

I think I agree with you, but I’ll defer to @icculus’s opinion on this.

Thanks for the visual comparison!

slouken avatar Nov 17 '24 23:11 slouken

I would really like this to use nearest scaling, so no fight from me on this. Let's merge it!

icculus avatar Nov 21 '24 01:11 icculus

How frequent are SDL3 preview releases? Can't wait to pin to a release that has this.

expikr avatar Nov 21 '24 11:11 expikr