gdiplus: Support StringFormatNoWrap for GdipMeasureString.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ziqing Hui 2020-10-23 10:22:10 +08:00 committed by Alexandre Julliard
parent 3f228497a8
commit c509060f52
2 changed files with 1 additions and 3 deletions

View File

@ -5270,7 +5270,7 @@ GpStatus gdip_format_string(HDC hdc,
if(*(stringdup + sum + fit) == ' ')
while(*(stringdup + sum + fit) == ' ')
fit++;
else
else if (!(format->attr & StringFormatFlagsNoWrap))
while(*(stringdup + sum + fit - 1) != ' '){
fit--;

View File

@ -4900,10 +4900,8 @@ todo_wine
rect.Height = 32000.0;
status = GdipMeasureString(graphics, string2, -1, font, &rect, format_no_wrap, &bounds, &glyphs, &lines);
expect(Ok, status);
todo_wine {
expectf_(width_M_M, bounds.Width, 0.1);
expect(3, glyphs);
}
expect(1, lines);
status = GdipDeleteFont(font);