Nikolay Sivov : dwrite: Properly reduce glyph count of effective run.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jun 26 07:11:54 CDT 2015


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

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Jun 25 11:10:39 2015 +0300

dwrite: Properly reduce glyph count of effective run.

---

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

diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 25e8eac..1094127 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -964,8 +964,8 @@ static HRESULT layout_add_effective_run(struct dwrite_textlayout *layout, const
         /* trim from the left */
         run->glyphcount = r->u.regular.run.glyphCount - r->u.regular.clustermap[start];
         /* trim from the right */
-        if (length < r->u.regular.descr.stringLength)
-            run->glyphcount -= r->u.regular.clustermap[start + length];
+        if (start + length < r->u.regular.descr.stringLength - 1)
+            run->glyphcount -= r->u.regular.run.glyphCount - r->u.regular.clustermap[start + length];
     }
     else
         run->glyphcount = 0;




More information about the wine-cvs mailing list