Commit 872e5697 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Properly reduce glyph count of effective run.

parent 8a948340
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment