gsk: Use supersampling for subpixel positioning
Currently, we upload glyphs to the texture at the device resolution, rendered shifted by their subpixel position. And then we place the texture aligned to the pixel grid. Since we use a 4x4 subpixel grid, we end up with up to 16 different renderings of the same glyph.
Another strategy I'd like to try is to render the glyphs at the subpixel resolution (ie 4x more pixel in both directions), and then use supersampling in the shader to get the pixel-resolution rendering, placing the texture at the subpixel position.
Relevant links:
- https://community.khronos.org/t/multisample-textures/69065/7
- https://community.khronos.org/t/sampler2dms-and-texelfetch/60196/2
As a side benefit, this should let us unify the handling of hi-dpi and subpixel positioning.
Edited by Matthias Clasen