Files
wxWidgets/src/common
Vadim Zeitlin 7092b1112e Fix caching of wxFONTSTYLE_SLANT fonts in wxTheFontList in wxMSW
Creating a font with wxFONTSTYLE_SLANT results in a font whose
GetStyle() returned wxFONTSTYLE_ITALIC, so it was never found in the
cache, resulting in, effectively, leaking memory and GDI handles because
each new call to wxFontList::FindOrCreateFont(...wxFONTSTYLE_SLANT)
created a new font.

Fix this by just hardcoding that wxFONTSTYLE_SLANT is wxFONTSTYLE_ITALIC
under MSW, this is ugly but avoids backwards incompatible (and not
obviously correct) change of making wxFont::GetStyle() return
wxFONTSTYLE_SLANT if the font was created using this style.

Notice that wxFont::GetStyle() does behave like this in wxOSX currently,
so there is an inconsistency between ports here. It would arguably be
better to make wxOSX behave like wxMSW because the actual font is really
italic and not slant/oblique and if we do this, the preprocessor
condition in this commit should be extended to cover wxOSX too.

Closes #17903.
2017-07-06 15:01:00 +02:00
..
2017-02-18 11:26:40 -08:00
2016-02-26 21:22:18 +01:00
2014-10-11 16:30:06 +00:00
2015-09-23 00:52:30 +02:00
2017-07-04 13:15:14 -06:00
2014-05-15 23:56:58 +00:00
2014-05-16 13:01:06 +00:00
2015-09-23 00:52:30 +02:00
2015-09-23 00:52:30 +02:00
2015-09-24 14:38:22 +02:00
2017-04-01 19:12:27 +02:00
2017-02-18 11:26:40 -08:00
2017-05-20 17:01:58 +02:00
2015-05-24 01:53:11 +02:00
2016-02-14 13:40:07 -08:00
2017-07-04 13:15:14 -06:00
2015-08-27 11:00:16 +02:00
2016-02-06 10:46:09 -08:00
2015-09-23 00:52:30 +02:00
2014-05-15 22:32:17 +00:00
2017-07-04 13:15:14 -06:00
2016-02-21 20:12:32 +02:00
2015-09-23 00:52:30 +02:00
2017-06-21 17:19:58 +02:00
2017-02-18 11:42:16 -08:00
2014-05-15 22:32:17 +00:00
2017-02-18 11:26:40 -08:00
2015-09-23 00:52:30 +02:00
2017-02-18 11:26:40 -08:00
2017-07-04 13:15:14 -06:00
2017-06-21 17:19:58 +02:00
2017-02-18 11:26:40 -08:00