]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/mainframe.cpp
-fno-strict-aliasing
[xonotic/netradiant.git] / radiant / mainframe.cpp
index dd3a17b9c8f1fa10b0cea6a9de8fa942459833b1..1555fa829b4ca3c7b56d56ba40aeec54d5208d5e 100644 (file)
@@ -3305,7 +3305,7 @@ void GridStatus_onTextureLockEnabledChanged()
 
 namespace
 {
-  GLFont g_font(0, 0);
+  GLFont g_font(0, 0, 0, 0);
 }
 
 void GlobalGL_sharedContextCreated()
@@ -3323,14 +3323,21 @@ void GlobalGL_sharedContextCreated()
   GlobalShaderCache().realise();
   Textures_Realise();
 
+#ifdef WIN32
+  /* win32 is dodgy here, just use courier new then */
+  g_font = glfont_create("courier new 8");
+#else
   /* use default font here (Sans 10 is gtk default) */
   GtkSettings *settings = gtk_settings_get_default();
   gchar *fontname;
   g_object_get(settings, "gtk-font-name", &fontname, NULL);
   g_font = glfont_create(fontname);
+#endif
 
   GlobalOpenGL().m_font = g_font.getDisplayList();
   GlobalOpenGL().m_fontHeight = g_font.getPixelHeight();
+  GlobalOpenGL().m_fontAscent = g_font.getPixelAscent();
+  GlobalOpenGL().m_fontDescent = g_font.getPixelDescent();
 }
 
 void GlobalGL_sharedContextDestroyed()