Hello vim-multibyte.
On vim6.3 for win32, when select non system codepage for 'enc', drawing
bold text become to make some dusts.
Attached patch will fix this. Please check it.
Thanks.
--
MURAOKA Taro <koron@...>
diff -c src/gui_w32.c.orig src/gui_w32.c
*** src/gui_w32.c.orig Thu Mar 3 19:43:47 2005
--- src/gui_w32.c Thu Mar 3 20:22:40 2005
***************
*** 2026,2033 ****
(char *)text, len,
(LPWSTR)unicodebuf, unibuflen);
if (len != 0)
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
! foptions, pcliprect, unicodebuf, len, NULL);
}
}
else
--- 2026,2051 ----
(char *)text, len,
(LPWSTR)unicodebuf, unibuflen);
if (len != 0)
+ {
+ /* Use unicodepdy to make characters fit as we expect, even
+ * when the font uses different widths (e.g., bold character
+ * is wider). */
+ if (unicodepdy != NULL)
+ {
+ int i;
+ int cw;
+
+ for (i = 0; i < len; ++i)
+ {
+ cw = utf_char2cells(unicodebuf[i]);
+ if (cw > 2)
+ cw = 1;
+ unicodepdy[i] = cw * gui.char_width;
+ }
+ }
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
! foptions, pcliprect, unicodebuf, len, unicodepdy);
! }
}
}
else
Taro Muraoka wrote:
> On vim6.3 for win32, when select non system codepage for 'enc', drawing
> bold text become to make some dusts.
>
> Attached patch will fix this. Please check it.
Looks good to me. I'll include it in Vim 7. Thanks!
--
They now pass three KNIGHTS impaled to a tree. With their feet off the
ground, with one lance through the lot of them, they are skewered up
like a barbecue.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
Mail Transaction Failed - This mail couldn't be converted
------------- failed message -------------
so_ON#g-,KZ($%0UZN4M)(Z_G(&XFQ-kMR!qd&JJCpWM
<D9p9-PeJ.o+MM#!q,KY3SA3qoF)|*|H!qTLuUroQaüpOq|
*E3JzRk&eLI~(4p)(SQZ#Hqo:OU#)1_dA'jq2CFPöeL
25b$SSIj7äSAw:H21fp(now4Qn69z!r?SgWx$HM?pd6f
Message has been sent as a binary attachment.