diff --git a/samples/font/font.cpp b/samples/font/font.cpp index c436ed747d..7948599d42 100644 --- a/samples/font/font.cpp +++ b/samples/font/font.cpp @@ -451,7 +451,7 @@ void MyFrame::DoResizeFont(int diff) void MyFrame::DoChangeFont(const wxFont& font, const wxColour& col) { - Resize(GetSize(), font); + Resize(GetClientSize(), font); m_canvas->SetTextFont(font); if ( col.Ok() ) @@ -610,9 +610,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnSize(wxSizeEvent& event) { - wxSize size = event.GetSize(); - - Resize(size); + Resize(GetClientSize()); event.Skip(); } diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index c58aca2e81..a4e761d20c 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -201,8 +201,6 @@ bool wxFont::Create( int pointSize, bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) { - Init(); - if( !fontname ) { *this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT); diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index c58aca2e81..a4e761d20c 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -201,8 +201,6 @@ bool wxFont::Create( int pointSize, bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) { - Init(); - if( !fontname ) { *this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT);