X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fmainframe.cpp;h=1555fa829b4ca3c7b56d56ba40aeec54d5208d5e;hb=857830098fde02315c7af7f4bc2d2f018eb67407;hp=dd3a17b9c8f1fa10b0cea6a9de8fa942459833b1;hpb=29b0e01ae7c5ec8f230ef79ad5beae40e29dd0eb;p=xonotic%2Fnetradiant.git diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index dd3a17b9..1555fa82 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -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()