[PATCH v2] d2d1: Fix the size and position of the text.

Nikolay Sivov nsivov at codeweavers.com
Tue Jan 12 03:22:15 CST 2021


> @@ -1171,10 +1171,10 @@ static void STDMETHODCALLTYPE d2d_device_context_DrawText(ID2D1DeviceContext *if
>  
>      if (measuring_mode == DWRITE_MEASURING_MODE_NATURAL)
>          hr = IDWriteFactory_CreateTextLayout(dwrite_factory, string, string_len, text_format,
> -                layout_rect->right - layout_rect->left, layout_rect->bottom - layout_rect->top, &text_layout);
> +                layout_rect->left, layout_rect->top, &text_layout);
>      else
>          hr = IDWriteFactory_CreateGdiCompatibleTextLayout(dwrite_factory, string, string_len, text_format,
> -                layout_rect->right - layout_rect->left, layout_rect->bottom - layout_rect->top, render_target->desc.dpiX / 96.0f,
> +                layout_rect->left, layout_rect->top, render_target->desc.dpiX / 96.0f,
>                  (DWRITE_MATRIX*)&render_target->drawing_state.transform, measuring_mode == DWRITE_MEASURING_MODE_GDI_NATURAL, &text_layout);
>      IDWriteFactory_Release(dwrite_factory);
>      if (FAILED(hr))
What does it fix? Arguments there are maximum width and height used as a
based for layout metrics.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210112/43735348/attachment-0001.htm>


More information about the wine-devel mailing list