mirror of
https://github.com/nicbarker/clay.git
synced 2025-01-23 09:56:03 +00:00
fix an edge case where text could be measured incorrectly
This commit is contained in:
parent
efec6ab1de
commit
0ef877eef7
19
clay.h
19
clay.h
@ -1541,8 +1541,23 @@ uint32_t Clay__HashTextWithConfig(Clay_String *text, Clay_TextElementConfig *con
|
||||
hash += (hash << 10);
|
||||
hash ^= (hash >> 6);
|
||||
|
||||
uint64_t configPointerAsNumber = (uint64_t)config;
|
||||
hash += configPointerAsNumber;
|
||||
hash += config->fontId;
|
||||
hash += (hash << 10);
|
||||
hash ^= (hash >> 6);
|
||||
|
||||
hash += config->fontSize;
|
||||
hash += (hash << 10);
|
||||
hash ^= (hash >> 6);
|
||||
|
||||
hash += config->lineHeight;
|
||||
hash += (hash << 10);
|
||||
hash ^= (hash >> 6);
|
||||
|
||||
hash += config->letterSpacing;
|
||||
hash += (hash << 10);
|
||||
hash ^= (hash >> 6);
|
||||
|
||||
hash += config->wrapMode;
|
||||
hash += (hash << 10);
|
||||
hash ^= (hash >> 6);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user