+ wxFont fontOut = attrOut.GetFont();
+#ifdef __WXMSW__
+ // Under MSW we get back an encoding in the font even though we hadn't
+ // specified it originally. It's not really a problem but we need this hack
+ // to prevent the assert below from failing because of it.
+ fontOut.SetEncoding(fontIn.GetEncoding());
+#endif
+ CPPUNIT_ASSERT_EQUAL( fontIn, fontOut );
+
+
+ // Also check the same for SetStyle().
+ fontIn.SetPointSize(10);
+ fontIn.SetWeight(wxFONTWEIGHT_BOLD);
+ attrIn.SetFont(fontIn);
+ m_text->SetStyle(0, 6, attrIn);
+
+ m_text->GetStyle(4, attrOut);
+ CPPUNIT_ASSERT( attrOut.HasFont() );
+
+ fontOut = attrOut.GetFont();
+#ifdef __WXMSW__
+ fontOut.SetEncoding(fontIn.GetEncoding());
+#endif
+ CPPUNIT_ASSERT_EQUAL( fontIn, fontOut );
+}
+
+void TextCtrlTestCase::Lines()
+{