+void MyFrame::OnCheckNativeToFromString(wxCommandEvent& WXUNUSED(event))
+{
+ wxString fontInfo = m_canvas->GetTextFont().GetNativeFontInfoDesc();
+
+ if ( fontInfo.IsEmpty() )
+ {
+ wxLogError("Native font info string is empty!");
+ }
+ else
+ {
+ wxFont *font = wxFont::New(fontInfo);
+ if ( fontInfo != font->GetNativeFontInfoDesc() )
+ wxLogError("wxNativeFontInfo ToString()/FromString() broken!");
+ else
+ wxLogError("wxNativeFontInfo works: %s", fontInfo.c_str());
+ delete font;
+ }
+}
+