+void MyFrame::OnCheckNativeToFromString(wxCommandEvent& WXUNUSED(event))
+{
+ wxString fontInfo = m_canvas->GetTextFont().GetNativeFontInfoDesc();
+
+ if ( fontInfo.IsEmpty() )
+ {
+ wxLogError(wxT("Native font info string is empty!"));
+ }
+ else
+ {
+ wxFont *font = wxFont::New(fontInfo);
+ if ( fontInfo != font->GetNativeFontInfoDesc() )
+ wxLogError(wxT("wxNativeFontInfo ToString()/FromString() broken!"));
+ else
+ wxLogError(wxT("wxNativeFontInfo works: %s"), fontInfo.c_str());
+ delete font;
+ }
+}
+
+void MyFrame::DoResizeFont(int diff)
+{
+ wxFont fontOld = m_canvas->GetTextFont();
+
+ DoChangeFont(
+ wxFont(
+ fontOld.GetPointSize() + diff,
+ fontOld.GetFamily(),
+ fontOld.GetStyle(),
+ fontOld.GetWeight(),
+ fontOld.GetUnderlined(),
+ fontOld.GetFaceName(),
+ fontOld.GetEncoding()
+ )
+ );
+}
+