Nikolay Sivov : dwrite: Use gdi-compatible placements in case of gdi-compatible layouts.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jan 9 11:49:15 CST 2015


Module: wine
Branch: master
Commit: 13083dcd523b4edcb275d0cfa7619558e386ee5a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=13083dcd523b4edcb275d0cfa7619558e386ee5a

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Jan  9 01:07:33 2015 +0300

dwrite: Use gdi-compatible placements in case of gdi-compatible layouts.

---

 dlls/dwrite/layout.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index ad8ac44..beb97b3 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))




More information about the wine-cvs mailing list