<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:ed@catmur.co.uk" title="Ed Catmur <ed@catmur.co.uk>"> <span class="fn">Ed Catmur</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Ligated characters are drawn multiple times when selected"
href="https://bugs.freedesktop.org/show_bug.cgi?id=9001">bug 9001</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #82642 is obsolete</td>
<td>
</td>
<td>1
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Ligated characters are drawn multiple times when selected"
href="https://bugs.freedesktop.org/show_bug.cgi?id=9001#c18">Comment # 18</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - Ligated characters are drawn multiple times when selected"
href="https://bugs.freedesktop.org/show_bug.cgi?id=9001">bug 9001</a>
from <span class="vcard"><a class="email" href="mailto:ed@catmur.co.uk" title="Ed Catmur <ed@catmur.co.uk>"> <span class="fn">Ed Catmur</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=82753" name="attach_82753" title="ligature-selection-paint.patch">attachment 82753</a> <a href="attachment.cgi?id=82753&action=edit" title="ligature-selection-paint.patch">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=9001&attachment=82753'>[review]</a>
ligature-selection-paint.patch
(In reply to <a href="show_bug.cgi?id=9001#c17">comment #17</a>)
<span class="quote">> Ok, I think I understand better the problem now. The unicode of words is
> normalized, but charcode of caharcters corresponds to the ligature, so that
> we render ligatures, but extracted text and characters are split. This means
> that for split characters we have the same charcode, but different text and
> bounding box. This allows us to select individual characters of a ligature
> or search for individual characters as well. Is this right? Assuming it's
> right, what is common in all characters of a ligature while rendering is the
> charcode and the transformation matrix, so I wonder if we could generalize
> it and avoid rendering the same character twice always with something liked
> this:
>
> if (i > begin &&
> sel->word->charcode[i - 1] == sel->word->charcode[i] &&
> sel->word->textMat[i - 1].m[4] == sel->word->textMat[i].m[4] &&
> sel->word->textMat[i - 1].m[5] == sel->word->textMat[i].m[5])
> continue;
>
> Your patch works fine, but changing the char looks a bit like a hack to me.</span >
Yes, definitely. I'm a bit uncomfortable using the transformation matrix to
identify characters as being from the same glyph; I'd prefer to use charPos as
that references glyph identity directly:
if (i != begin && sel->word->charPos[i] == sel->word->charPos[i - 1])
continue;</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>