Fix from Robert de Bath which reorders the Windows initialisation
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 13 May 2012 15:59:24 +0000 (15:59 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Sun, 13 May 2012 15:59:24 +0000 (15:59 +0000)
sequence: since init_fonts sets up ucsdata based on the available
Windows fonts, we should call it before passing ucsdata to term_init.

git-svn-id: svn://svn.tartarus.org/sgt/putty@9527 cda61777-01e9-0310-a592-d414129be87e

windows/window.c

index df69db1..a0a5268 100644 (file)
@@ -699,6 +699,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
     }
 
     /*
+     * Initialise the fonts, simultaneously correcting the guesses
+     * for font_{width,height}.
+     */
+    init_fonts(0,0);
+
+    /*
      * Initialise the terminal. (We have to do this _after_
      * creating the window, since the terminal is the first thing
      * which will call schedule_timer(), which will in turn call
@@ -712,12 +718,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
              conf_get_int(conf, CONF_savelines));
 
     /*
-     * Initialise the fonts, simultaneously correcting the guesses
-     * for font_{width,height}.
-     */
-    init_fonts(0,0);
-
-    /*
      * Correct the guesses for extra_{width,height}.
      */
     {