Open drewmiller opened 3 weeks ago
Note that we already have a setting for this, though maybe it is not by the actual text layout engine: https://docs.rs/epaint/latest/epaint/tessellator/struct.TessellationOptions.html#structfield.round_text_to_pixels
Note that we already have a setting for this, though maybe it is not by the actual text layout engine: https://docs.rs/epaint/latest/epaint/tessellator/struct.TessellationOptions.html#structfield.round_text_to_pixels
My concerns are primarily around the layout of the text, so I haven't had a chance to investigate the interaction with tesselation, but I will. I'll come back to you.
Recognizing that a switch to Cosmic Text is on the way per #56 , I also wanted to implement a temporary feature which disables what I call "text snapping"--i.e., where we round to the nearest pixel on the x and y axis when rendering text. This results in text being laid out in different ways across
pixel_per_point
values. Such snapping improves font rendering in the absence of other anti-aliasing approaches which will be provided by Cosmic Text. For some contexts, however, maintaining the layout is more important acrosspixel_per_point
values. This feature allows for that until Cosmic Text saves the day.