font/shaper: run hash should include font index

This commit is contained in:
Mitchell Hashimoto
2024-05-01 19:53:27 -07:00
parent bc0e4c6d8f
commit 6683b159ce

View File

@ -250,6 +250,9 @@ pub const RunIterator = struct {
// Add our length to the hash as an additional mechanism to avoid collisions
autoHash(&hasher, j - self.i);
// Add our font index
autoHash(&hasher, current_font);
// Move our cursor. Must defer since we use self.i below.
defer self.i = j;