X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwindow.c;h=a0a526856d1520edee61848e63ae5b3bd502c091;hb=29184e3702f7b9131d78f4732e4deae5d1c918bc;hp=80ca79559c5dbad477100756c0d1db88f7ee6391;hpb=053d2ba6d1c35c3d3c77bbc48bfd31fd8628ed35;p=PuTTY.git diff --git a/windows/window.c b/windows/window.c index 80ca7955..a0a52685 100644 --- a/windows/window.c +++ b/windows/window.c @@ -698,6 +698,12 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) NULL, NULL, inst, NULL); } + /* + * 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 @@ -711,12 +717,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) conf_get_int(conf, CONF_width), 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}. */ @@ -3371,6 +3371,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, if (attr & ATTR_NARROW) nfont |= FONT_NARROW; +#ifdef USES_VTLINE_HACK /* Special hack for the VT100 linedraw glyphs. */ if (text[0] >= 0x23BA && text[0] <= 0x23BD) { switch ((unsigned char) (text[0])) { @@ -3395,6 +3396,7 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, force_manual_underline = 1; } } +#endif /* Anything left as an original character set is unprintable. */ if (DIRECT_CHAR(text[0]) && @@ -3513,12 +3515,13 @@ void do_text_internal(Context ctx, int x, int y, wchar_t *text, int len, len += 2; } - if (len > lpDx_len) { - if (len > lpDx_len) { - lpDx_len = len * 9 / 8 + 16; - lpDx = sresize(lpDx, lpDx_len, int); - } - } + if (len > lpDx_len) { + lpDx_len = len * 9 / 8 + 16; + lpDx = sresize(lpDx, lpDx_len, int); + + if (lpDx_maybe) lpDx_maybe = lpDx; + } + { int i; /* only last char has dx width in SURROGATE PAIR and