Fix wxDC::SetFont() documentation

Don't say that passing wxNullFont to it is allowed because it isn't
neither in wxGTK nor in wxOSX and also remove the part about destroying
the previous font because we hadn't had to destroy the fonts explicitly
since 25 years.

Still document that setting an invalid font works in wxMSW, but explain
that doing this is not a good idea.
This commit is contained in:
Vadim Zeitlin 2022-03-29 22:57:45 +01:00
parent 0138fcfa32
commit 0dac661468

View File

@ -1155,9 +1155,10 @@ public:
/**
Sets the current font for the DC.
If the argument is ::wxNullFont (or another invalid font; see wxFont::IsOk),
the current font is selected out of the device context (leaving wxDC without
any valid font), allowing the current font to be destroyed safely.
The @a font parameter should be valid, although in wxMSW port (only)
the argument ::wxNullFont is also accepted and resets the device
context font to the default value used by the system (which is not
generally useful).
@see wxFont
*/