1
0
forked from aniani/vim

updated for version 7.3.1220

Problem:    MS-Windows: When using wide font italic and bold are not included.
Solution:   Support wide-bold, wide-italic and wide-bold-italic. (Ken Takata,
            Taro Muraoka)
This commit is contained in:
Bram Moolenaar
2013-06-17 22:43:25 +02:00
parent a0c85c7ae1
commit db250526bb
4 changed files with 77 additions and 3 deletions

View File

@@ -3123,9 +3123,43 @@ update_im_font()
void
gui_mch_wide_font_changed()
{
# ifndef MSWIN16_FASTTEXT
LOGFONT lf;
# endif
# ifdef FEAT_MBYTE_IME
update_im_font();
# endif
# ifndef MSWIN16_FASTTEXT
gui_mch_free_font(gui.wide_ital_font);
gui.wide_ital_font = NOFONT;
gui_mch_free_font(gui.wide_bold_font);
gui.wide_bold_font = NOFONT;
gui_mch_free_font(gui.wide_boldital_font);
gui.wide_boldital_font = NOFONT;
if (gui.wide_font
&& GetObject((HFONT)gui.wide_font, sizeof(lf), &lf))
{
if (!lf.lfItalic)
{
lf.lfItalic = TRUE;
gui.wide_ital_font = get_font_handle(&lf);
lf.lfItalic = FALSE;
}
if (lf.lfWeight < FW_BOLD)
{
lf.lfWeight = FW_BOLD;
gui.wide_bold_font = get_font_handle(&lf);
if (!lf.lfItalic)
{
lf.lfItalic = TRUE;
gui.wide_boldital_font = get_font_handle(&lf);
}
}
}
# endif
}
#endif