On Fri Apr 17 11:37:58 2026 +0000, Dmitry Timoshkov wrote:
Does new version of the patches resemble something you had in mind? I had to mark some of the tests that rely on strange GdipMeasureCharacterRanges() logic for cases when the string doesn't fit onto the provided bounds as todo_wine in last commit since I couldn't figure out how it's supposed to work, that could be investigated separately. My understanding is that native gdiplus does its calculations in the font's native size, and linearly scales them. Since rendered text (at least the way we do it) doesn't actually linearly scale, there is a possibility that they will have to render text in too small a space. The padding exists to make this less likely. If the text size does not match the space it's supposed to render in, native will squeeze characters together or spread them apart.
This results in complex code that renders ugly text, so I don't think we should do that. I'm guessing that GdipMeasureCharacterRanges reflects the actual rendering, while GdipMeasureString and GdipDrawString do not. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9775#note_136816