0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

updated for version 7.0055

This commit is contained in:
Bram Moolenaar
2005-03-04 23:39:37 +00:00
parent 7383034c0a
commit 19a09a1893
39 changed files with 5044 additions and 3475 deletions

View File

@@ -1958,7 +1958,7 @@ gui_mch_draw_string(
++clen;
}
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
foptions, pcliprect, unicodebuf, clen, unicodepdy);
foptions, pcliprect, unicodebuf, clen, unicodepdy);
len = cells; /* used for underlining */
}
else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9)
@@ -1975,8 +1975,26 @@ gui_mch_draw_string(
(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, NULL);
foptions, pcliprect, unicodebuf, len, unicodepdy);
}
}
}
else