+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;
+ }
+}
+