]> git.saurik.com Git - wxWidgets.git/commit - include/wx/font.h
Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 29 Sep 2010 13:46:09 +0000 (13:46 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 29 Sep 2010 13:46:09 +0000 (13:46 +0000)
commit59b7da02ff62a33862accc13158870f2a9a23630
treeedc8141fad67d5bae830890b8b9a8d49d43e64f0
parent4a21ea9d9eec67383ffba7c86f7c413ddee28114
Return wxFONTFAMILY_DEFAULT, not UNKNOWN, from wxFont::GetFamily().

Although returning wxFONTFAMILY_UNKNOWN when the font family is not recognized
makes more sense, it breaks a lot of existing code including all the
font-related code generated by DialogBlocks, so prefer to return
wxFONTFAMILY_DEFAULT instead -- which can't be confused for a valid font
family neither but can be passed to wxFont ctor or SetFamily() without
problems.

To ensure that this behaviour is correctly implemented by all ports, rename
the existing wxFont::GetFamily() to DoGetFamily() and call the new method from
wxFontBase::GetFamily() which adjusts the return value if needed.

Closes #12330.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
25 files changed:
include/wx/cocoa/font.h
include/wx/dfb/font.h
include/wx/font.h
include/wx/gtk/font.h
include/wx/gtk1/font.h
include/wx/mgl/font.h
include/wx/motif/font.h
include/wx/msw/font.h
include/wx/os2/font.h
include/wx/osx/font.h
include/wx/palmos/font.h
include/wx/x11/font.h
interface/wx/font.h
src/cocoa/font.mm
src/common/fontcmn.cpp
src/dfb/font.cpp
src/gtk/font.cpp
src/gtk1/font.cpp
src/mgl/font.cpp
src/motif/font.cpp
src/msw/font.cpp
src/os2/font.cpp
src/osx/carbon/font.cpp
src/palmos/font.cpp
src/x11/font.cpp