diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index ad8ac446d24..beb97b306ac 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -441,10 +441,18 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) goto memerr; /* now set advances and offsets */ - hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, run->descr.string, run->descr.clusterMap, text_props, - run->descr.stringLength, run->run.glyphIndices, glyph_props, run->run.glyphCount, run->run.fontFace, - run->run.fontEmSize, FALSE /* FIXME */, run->run.bidiLevel & 1, &run->sa, run->descr.localeName, - NULL, NULL, 0, run->advances, run->offsets); + if (layout->gdicompatible) + hr = IDWriteTextAnalyzer_GetGdiCompatibleGlyphPlacements(analyzer, run->descr.string, run->descr.clusterMap, + text_props, run->descr.stringLength, run->run.glyphIndices, glyph_props, run->run.glyphCount, + run->run.fontFace, run->run.fontEmSize, layout->pixels_per_dip, &layout->transform, layout->use_gdi_natural, + FALSE /* FIXME */, run->run.bidiLevel & 1, &run->sa, run->descr.localeName, NULL, NULL, 0, + run->advances, run->offsets); + else + hr = IDWriteTextAnalyzer_GetGlyphPlacements(analyzer, run->descr.string, run->descr.clusterMap, text_props, + run->descr.stringLength, run->run.glyphIndices, glyph_props, run->run.glyphCount, run->run.fontFace, + run->run.fontEmSize, FALSE /* FIXME */, run->run.bidiLevel & 1, &run->sa, run->descr.localeName, + NULL, NULL, 0, run->advances, run->offsets); + heap_free(text_props); heap_free(glyph_props); if (FAILED(hr))