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

Esme Povirk (they/them) esme at codeweavers.com
Thu Oct 22 23:23:48 CDT 2020


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nowrap.c
Type: text/x-csrc
Size: 4256 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201022/146deaa2/attachment.c>


More information about the wine-devel mailing list