gsk: Handling font hinting properly with fractional scaling
The hinter assumes that glyphs are placed at an integral pixel position, and operates accordingly.
If we use hinting, but then place the glyph at a fractional position, we end up smearing out the carefully aligned boundaries that he hinter produced.
So, there are two ways we can operate:
- No hinting. Place glyphs as close the the desired position as feasible, i.e. subpixel positioning in device space
- Hinting. Place glyphs at integral positions in device space
We already do the first one perfectly fine. But if hinting is on, we don't currently do the right thing.
One detail to consider here is that the hinter only operates on the y axis, so for best results, we may want to have subpixel positioning for x, but not for y.
And we should just use an unhinted font if the transform is nontrivial.
Edited by Matthias Clasen