<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - 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;">Status</td>
<td>REOPENED
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - Ligated characters are drawn multiple times when selected"
href="https://bugs.freedesktop.org/show_bug.cgi?id=9001#c19">Comment # 19</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - 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:carlosgc@gnome.org" title="Carlos Garcia Campos <carlosgc@gnome.org>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=9001#c18">comment #18</a>)
<span class="quote">> 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> [review]
> ligature-selection-paint.patch
>
> (In reply to <a href="show_bug.cgi?id=9001#c17">comment #17</a>)
> > 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.
>
> 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;</span >
Yes, this is a lot cleaner, thanks! I've just pushed it to git master.</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>