dwrite: Properly reduce glyph count of effective run.

This commit is contained in:
Nikolay Sivov 2015-06-25 11:10:39 +03:00 committed by Alexandre Julliard
parent 8a9483400a
commit 872e569744
1 changed files with 2 additions and 2 deletions

View File

@ -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;