- Qt built with freetype
- The same font file used
- Font size set in pixels
- No retina / highdpi feature (100% zoom on windows and no scaling on macos)
There are still slight differences in font rendering, which cause text wrapping to occur differently depending on the platform.
I've tried to pinpoint what changes by printing the most relevant font metrics, but they seem to be the same in both systems.
Attached : screenshots of the test app on macOS & windows, as well as the source code I used.
The test app draws the same text in slightly wider boxes.
On windows, word wrap stops occuring at w=282, while on macOS, word wrap stops occuring at w=285 which prevents having the same text layout on both platforms in general, given a same-sized box.