dwrite: Properly reduce glyph count of effective run.
This commit is contained in:
parent
8a9483400a
commit
872e569744
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue