+
+ //glXUseXFont( (Font)(theFont->handle()), 0, 256, listBase );
+ int aFontCont = 0;
+ char** xFontList = XListFonts( aDisp, aFindFont.myFontString.data(), 1, &aFontCont );
+ if( !theFont->handle() )
+ {
+#ifdef _DEBUG_
+ printf( "Can't load font %s. loading default font....\n", aFindFont.myFontString.data() );
+#endif
+ QString aFontMask ("-*-*-*-r-*-*-");
+ aFontMask += aFindFont.myFontString.section( ',', 1, 1 );
+#ifdef _DEBUG_
+ printf( "Height of Default font: %s\n", aFindFont.myFontString.section( ',', 1, 1 ).data() );
+#endif
+ aFontMask += "-*-*-*-m-*-*-*";
+ xFontList = XListFonts( aDisp, aFontMask.data()/*"-*-*-*-r-*-*-12-*-*-*-m-*-*-*"*/, 1, &aFontCont );
+ if( aFontCont == 0 )
+ {
+#ifdef _DEBUG_
+ printf( "Can't load default font\n" );
+#endif
+ return 0;
+ }
+ glXUseXFont( (Font)(XLoadFont( aDisp,xFontList[0] )), 0, 256, listBase );
+ }
+ else
+ glXUseXFont( (Font)(theFont->handle()), 0, 256, listBase );
+