wxFontList doesn't correctly match existing fonts
|Reported by:||eco||Owned by:|
On WXGTK there is a specialization in wxFontList::FindOrCreateFont to match when the font family is wxFONTFAMILY_DEFAULT and the font from the existing list is wxFONTFAMILY_SWISS but all other platforms just compare font family directly (with a note by VZ wondering why the other platforms don't use the same logic as GTK). On Windows the exact same issue happens where SWISS is the default font family.
This led to fonts often not matching and identical fonts being added over and over to the font list. On Windows this can exhaust GDI resources and cause some nasty program drawing corruptions and crashes.
Attached is a patch in which I've simply made all platforms follow the same logic as the WXGTK specialization. My software no longer slows down and eventually crashes as GDI resources get exhausted.