Windows font rendering improvements

Inspired by #4885:

* win32 refactoring
* winrt implementation

(The `max` operation is needed since the winrt font renderer adds glyphs one by one, and thus may visit a pixel several times)