+ CPPUNIT_ASSERT( temp2.SetNativeFontInfoUserDesc(niud) );
+ CPPUNIT_ASSERT( temp2.IsOk() );
+
+#ifdef __WXGTK__
+ // Pango saves/restores all font info in the user-friendly string:
+ WX_ASSERT_MESSAGE(
+ ("Test #%lu failed; native info user desc was \"%s\" for test and \"%s\" for temp2", \
+ n, niud, temp2.GetNativeFontInfoUserDesc()),
+ temp2 == test );
+#else
+ // NOTE: as documented GetNativeFontInfoUserDesc/SetNativeFontInfoUserDesc
+ // are not granted to save/restore all font info.
+ // In fact e.g. the font family is not saved at all; test only those
+ // info which GetNativeFontInfoUserDesc() does indeed save:
+ CPPUNIT_ASSERT_EQUAL( test.GetWeight(), temp2.GetWeight() );
+ CPPUNIT_ASSERT_EQUAL( test.GetStyle(), temp2.GetStyle() );
+ CPPUNIT_ASSERT( test.GetFaceName().CmpNoCase(temp2.GetFaceName()) == 0 );
+ CPPUNIT_ASSERT_EQUAL( test.GetPointSize(), temp2.GetPointSize() );
+ CPPUNIT_ASSERT_EQUAL( test.GetEncoding(), temp2.GetEncoding() );
+#endif
+
+