[PATCH 2/2] gdiplus: Support StringFormatNoWrap for GdipMeasureString.

Ziqing Hui zhui at codeweavers.com
Fri Oct 23 03:53:15 CDT 2020


Thanks so much for the testing!

On 10/23/20 12:23 PM, Esme Povirk (they/them) wrote:
> Signed-off-by: Esme Povirk <esme at codeweavers.com>
>
> Having written a test program:
>
> Windows draws the line up to the last character that fully fits, just
> as your patch does.
>
> The measured width is based on the characters drawn, which also
> matches your patch.
>
> There are some differences. On Windows, the second line is always
> drawn, but on Wine it is only drawn if the first line fits. Windows
> will draw a partial line, clipping it to the height, but Wine will
> draw the full line. If a partial line fits, heights from MeasureString
> and MeasureCharacterRanges on Windows are clipped to the rectangle
> passed in, while on Wine these functions behave as if the line hasn't
> been rendered. Also, Wine's MeasureCharacterRanges will sometimes
> return rectangles for characters that aren't being rendered.
>
> These problems existed already and are not caused by your patch, and
> it does get us closer to the correct behavior. So while it would be
> nice to fix them, I think it's OK to accept your patch as-is.



More information about the wine-devel mailing list