+#endif
+#if HAVE_WXWINDOWS
+ if (m_driver.isWX()) {
+ double dHeightPixels = height * m_iPhysicalYSize;
+ double dHeightPoints = dHeightPixels * m_dPointsPerPixel;
+ m_font.SetPointSize (nearest<int>(dHeightPoints));
+ m_driver.idWX()->SetFont (m_font);
+ }
+#endif
+}
+
+void
+SGP::setTextNDCSize (double height)
+{
+ double dHeightPixels = height * m_iPhysicalYSize;
+#if HAVE_G2_H
+ if (m_driver.isG2())
+ g2_set_font_size(m_driver.idG2(), nearest<int>(dHeightPixels));
+#endif
+#if HAVE_WXWINDOWS
+ if (m_driver.isWX()) {
+ double dHeightPoints = dHeightPixels * m_dPointsPerPixel;
+ m_font.SetPointSize (nearest<int>(dHeightPoints));
+ m_driver.idWX()->SetFont (m_font);
+ }
+#endif
+}
+
+void
+SGP::setTextPointSize (double height)
+{
+#if HAVE_G2_H
+ // if (m_driver.isG2())
+ // g2_set_font_size(m_driver.idG2(), (height * m_iPhysicalYSize));
+#endif
+#if HAVE_WXWINDOWS
+ if (m_driver.isWX()) {
+ m_font.SetPointSize (static_cast<int>(height+0.5));
+ m_driver.idWX()->SetFont (m_font);
+ }
+#endif
+}
+
+void
+SGP::getTextExtent (const char* szText, double* worldW, double* worldH)
+{
+#if HAVE_WXWINDOWS
+ if (m_driver.isWX()) {
+ wxString sText (szText);
+ wxCoord deviceW, deviceH;
+ m_driver.idWX()->GetTextExtent (sText, &deviceW, &deviceH);
+ *worldW = static_cast<double>(deviceW) / static_cast<double>(m_iPhysicalXSize);;
+ *worldH = static_cast<double>(deviceH) / static_cast<double>(m_iPhysicalYSize);
+ *worldW *= (xw_max - xw_min);
+ *worldH *= (yw_max - yw_min);
+ }
+#endif
+}
+
+double
+SGP::getCharHeight ()
+{
+ double dHeight = (1. / 25.);
+
+#if HAVE_WXWINDOWS
+ if (m_driver.isWX()) {
+ dHeight = m_driver.idWX()->GetCharHeight();
+ dHeight /= static_cast<double>(m_iPhysicalYSize);
+ }
+#endif
+ dHeight *= (yw_max - yw_min);
+ return dHeight;
+}
+
+double
+SGP::getCharWidth ()
+{
+ double dWidth = (1. / 80.);
+
+#if HAVE_WXWINDOWS
+ if (m_driver.isWX()) {
+ dWidth = m_driver.idWX()->GetCharWidth();
+ dWidth /= static_cast<double>(m_iPhysicalXSize);
+ }
+#endif
+ dWidth *= (xw_max - xw_min);
+ return dWidth;