From babc991433a25ec5304a20e74c4acc65df2cebe4 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 27 Apr 2009 19:01:38 +0000 Subject: [PATCH] always use courier new 8 on win32 again git-svn-id: svn://svn.icculus.org/netradiant/trunk@351 61c419a2-8eb2-4b30-bcec-8cead039b335 --- radiant/mainframe.cpp | 5 +++++ radiant/xywindow.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index d6f467da..1555fa82 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -3323,11 +3323,16 @@ 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(); diff --git a/radiant/xywindow.cpp b/radiant/xywindow.cpp index 2ab3247b..f82b99ba 100644 --- a/radiant/xywindow.cpp +++ b/radiant/xywindow.cpp @@ -1844,7 +1844,7 @@ void XYWnd::XY_DrawGrid(void) { glColor3fv(vector3_to_array(g_xywindow_globals.color_gridtext)); // why does this not work on windows: // float offx = m_vOrigin[nDim2] + h - (1 + GlobalOpenGL().m_fontAscent) / m_fScale; - float offx = m_vOrigin[nDim2] + h - 14 / m_fScale; + float offx = m_vOrigin[nDim2] + h - 13 / m_fScale; float offy = m_vOrigin[nDim1] - w + 1 / m_fScale; for (x = xb - fmod(xb, stepx); x <= xe ; x += stepx) { glRasterPos2f (x, offx); -- 2.39.2