Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphics.c:
+ GpStringFormat *generic_format; + RectF bound_box; + DWORD to_draw_length; + struct gdip_font_link_section *section; + GpStatus stat = Ok;
position.X = args->x + bounds->X / args->rel_width; position.Y = args->y + bounds->Y / args->rel_height + args->ascent;
- stat = draw_driver_string(args->graphics, &string[index], length, font, format, - args->brush, &position, + GdipStringFormatGetGenericTypographic(&generic_format); + for (int i = 0; i < length; i += to_draw_length) + { + section = get_font_link_section(font_link_info, index + i); + to_draw_length = min(length, section->len - ((index + i) - section->index)); I think this should be `min(length - i, section->len - ((index + i) - section->index))`
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4082#note_55719