<p></p>
<p>Yeah instead of hashing I could have 4 cache variables "just" compare that (font, size, zoom and ascent+descent).  Indeed that would avoid clashes, and it only requires keeping one copy of the previous font string around, and I guess the memory impact is probably not relevant.</p>
<p>I'm not sure it'd be much faster, but possibly.  The advantage I see with the hash approach is that it makes it simpler as there's a single comparison instead of 4 to combine, and only one value to keep, instead of having the 4 prev + 4 old ones.</p>
<p>I'll check, but I don't think speed matters -- clash might be relevant though.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786107">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJYOEPJAO5TYLQ6YWGTS5PM4FANCNFSM4XDYPPXA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ6ACHFZVL764NHMNR3S5PM4FA5CNFSM4XDYPPXKYY3PNVWWK3TUL52HS4DFVVBW63LNNF2EG33NNVSW45FKMNXW23LFNZ2F62LEZYBMTZR3.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786107",
"url": "https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786107",
"name": "View Commit"
},
"description": "View this Commit on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>