<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
</head>
<body>
<blockquote type="cite">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; white-space: pre-wrap;">@@ -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))</pre>
</blockquote>
What does it fix? Arguments there are maximum width and height used
as a based for layout metrics.<br>
</body>
</html>