summaryrefslogtreecommitdiff
path: root/src/lib/font_comparator.h
AgeCommit message (Collapse)Author
2023-04-19In 1c73379ed8483dcf71c5ccfc459c2c22516a9aef I changedCarl Hetherington
FontConfig::_available_fonts to use the font ID as a key, but that's totally wrong because the same Font object with the same ID can have its font filename/data changed, and in that case we don't want to use the cached font. Here we use the actual TTF/OTF font data as the key. We could have just hashed the data (whether it comes from a disk file or is held in memory) but this is slower in the case where we have the filename, as then the file must be loaded from disk for each comparison. This fixes #2518.