|
Karsten Hopp |
6710e6 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
6710e6 |
Subject: Patch 7.3.1220
|
|
Karsten Hopp |
6710e6 |
Fcc: outbox
|
|
Karsten Hopp |
6710e6 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
6710e6 |
Mime-Version: 1.0
|
|
Karsten Hopp |
6710e6 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
6710e6 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
6710e6 |
------------
|
|
Karsten Hopp |
6710e6 |
|
|
Karsten Hopp |
6710e6 |
Patch 7.3.1220
|
|
Karsten Hopp |
6710e6 |
Problem: MS-Windows: When using wide font italic and bold are not included.
|
|
Karsten Hopp |
6710e6 |
Solution: Support wide-bold, wide-italic and wide-bold-italic. (Ken Takata,
|
|
Karsten Hopp |
6710e6 |
Taro Muraoka)
|
|
Karsten Hopp |
6710e6 |
Files: src/gui.c, src/gui.h, src/gui_w48.c
|
|
Karsten Hopp |
6710e6 |
|
|
Karsten Hopp |
6710e6 |
|
|
Karsten Hopp |
6710e6 |
*** ../vim-7.3.1219/src/gui.c 2013-06-12 20:35:46.000000000 +0200
|
|
Karsten Hopp |
6710e6 |
--- src/gui.c 2013-06-17 22:22:49.000000000 +0200
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 410,415 ****
|
|
Karsten Hopp |
6710e6 |
--- 410,423 ----
|
|
Karsten Hopp |
6710e6 |
gui.fontset = NOFONTSET;
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
#endif
|
|
Karsten Hopp |
6710e6 |
+ #ifdef FEAT_MBYTE
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ # ifndef FEAT_GUI_GTK
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_bold_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_ital_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_boldital_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ # endif
|
|
Karsten Hopp |
6710e6 |
+ #endif
|
|
Karsten Hopp |
6710e6 |
|
|
Karsten Hopp |
6710e6 |
#ifdef FEAT_MENU
|
|
Karsten Hopp |
6710e6 |
# ifndef FEAT_GUI_GTK
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 1012,1017 ****
|
|
Karsten Hopp |
6710e6 |
--- 1020,1030 ----
|
|
Karsten Hopp |
6710e6 |
gui.wide_font = font;
|
|
Karsten Hopp |
6710e6 |
# ifdef FEAT_GUI_MSWIN
|
|
Karsten Hopp |
6710e6 |
gui_mch_wide_font_changed();
|
|
Karsten Hopp |
6710e6 |
+ # else
|
|
Karsten Hopp |
6710e6 |
+ /*
|
|
Karsten Hopp |
6710e6 |
+ * TODO: setup wide_bold_font, wide_ital_font and wide_boldital_font to
|
|
Karsten Hopp |
6710e6 |
+ * support those fonts for 'guifontwide'.
|
|
Karsten Hopp |
6710e6 |
+ */
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
return OK;
|
|
Karsten Hopp |
6710e6 |
}
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 2180,2185 ****
|
|
Karsten Hopp |
6710e6 |
--- 2193,2201 ----
|
|
Karsten Hopp |
6710e6 |
guicolor_T sp_color;
|
|
Karsten Hopp |
6710e6 |
#if !defined(MSWIN16_FASTTEXT) && !defined(FEAT_GUI_GTK)
|
|
Karsten Hopp |
6710e6 |
GuiFont font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ # ifdef FEAT_MBYTE
|
|
Karsten Hopp |
6710e6 |
+ GuiFont wide_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ # endif
|
|
Karsten Hopp |
6710e6 |
# ifdef FEAT_XFONTSET
|
|
Karsten Hopp |
6710e6 |
GuiFontset fontset = NOFONTSET;
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 2269,2274 ****
|
|
Karsten Hopp |
6710e6 |
--- 2285,2307 ----
|
|
Karsten Hopp |
6710e6 |
}
|
|
Karsten Hopp |
6710e6 |
else
|
|
Karsten Hopp |
6710e6 |
font = gui.norm_font;
|
|
Karsten Hopp |
6710e6 |
+
|
|
Karsten Hopp |
6710e6 |
+ # ifdef FEAT_MBYTE
|
|
Karsten Hopp |
6710e6 |
+ /*
|
|
Karsten Hopp |
6710e6 |
+ * Choose correct wide_font by font. wide_font should be set with font
|
|
Karsten Hopp |
6710e6 |
+ * at same time in above block. But it will make many "ifdef" nasty
|
|
Karsten Hopp |
6710e6 |
+ * blocks. So we do it here.
|
|
Karsten Hopp |
6710e6 |
+ */
|
|
Karsten Hopp |
6710e6 |
+ if (font == gui.boldital_font && gui.wide_boldital_font)
|
|
Karsten Hopp |
6710e6 |
+ wide_font = gui.wide_boldital_font;
|
|
Karsten Hopp |
6710e6 |
+ else if (font == gui.bold_font && gui.wide_bold_font)
|
|
Karsten Hopp |
6710e6 |
+ wide_font = gui.wide_bold_font;
|
|
Karsten Hopp |
6710e6 |
+ else if (font == gui.ital_font && gui.wide_ital_font)
|
|
Karsten Hopp |
6710e6 |
+ wide_font = gui.wide_ital_font;
|
|
Karsten Hopp |
6710e6 |
+ else if (font == gui.norm_font && gui.wide_font)
|
|
Karsten Hopp |
6710e6 |
+ wide_font = gui.wide_font;
|
|
Karsten Hopp |
6710e6 |
+ # endif
|
|
Karsten Hopp |
6710e6 |
+
|
|
Karsten Hopp |
6710e6 |
}
|
|
Karsten Hopp |
6710e6 |
# ifdef FEAT_XFONTSET
|
|
Karsten Hopp |
6710e6 |
if (fontset != NOFONTSET)
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 2407,2413 ****
|
|
Karsten Hopp |
6710e6 |
# ifdef FEAT_XFONTSET
|
|
Karsten Hopp |
6710e6 |
&& fontset == NOFONTSET
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
! && gui.wide_font != NOFONT)
|
|
Karsten Hopp |
6710e6 |
curr_wide = TRUE;
|
|
Karsten Hopp |
6710e6 |
else
|
|
Karsten Hopp |
6710e6 |
curr_wide = FALSE;
|
|
Karsten Hopp |
6710e6 |
--- 2440,2446 ----
|
|
Karsten Hopp |
6710e6 |
# ifdef FEAT_XFONTSET
|
|
Karsten Hopp |
6710e6 |
&& fontset == NOFONTSET
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
! && wide_font != NOFONT)
|
|
Karsten Hopp |
6710e6 |
curr_wide = TRUE;
|
|
Karsten Hopp |
6710e6 |
else
|
|
Karsten Hopp |
6710e6 |
curr_wide = FALSE;
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 2441,2447 ****
|
|
Karsten Hopp |
6710e6 |
if (thislen > 0)
|
|
Karsten Hopp |
6710e6 |
{
|
|
Karsten Hopp |
6710e6 |
if (prev_wide)
|
|
Karsten Hopp |
6710e6 |
! gui_mch_set_font(gui.wide_font);
|
|
Karsten Hopp |
6710e6 |
gui_mch_draw_string(gui.row, scol, s + start, thislen,
|
|
Karsten Hopp |
6710e6 |
draw_flags);
|
|
Karsten Hopp |
6710e6 |
if (prev_wide)
|
|
Karsten Hopp |
6710e6 |
--- 2474,2480 ----
|
|
Karsten Hopp |
6710e6 |
if (thislen > 0)
|
|
Karsten Hopp |
6710e6 |
{
|
|
Karsten Hopp |
6710e6 |
if (prev_wide)
|
|
Karsten Hopp |
6710e6 |
! gui_mch_set_font(wide_font);
|
|
Karsten Hopp |
6710e6 |
gui_mch_draw_string(gui.row, scol, s + start, thislen,
|
|
Karsten Hopp |
6710e6 |
draw_flags);
|
|
Karsten Hopp |
6710e6 |
if (prev_wide)
|
|
Karsten Hopp |
6710e6 |
*** ../vim-7.3.1219/src/gui.h 2013-01-23 13:40:54.000000000 +0100
|
|
Karsten Hopp |
6710e6 |
--- src/gui.h 2013-06-17 22:22:49.000000000 +0200
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 311,317 ****
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
#endif
|
|
Karsten Hopp |
6710e6 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
6710e6 |
! GuiFont wide_font; /* 'guifontwide' font */
|
|
Karsten Hopp |
6710e6 |
#endif
|
|
Karsten Hopp |
6710e6 |
#ifdef FEAT_XFONTSET
|
|
Karsten Hopp |
6710e6 |
GuiFontset fontset; /* set of fonts for multi-byte chars */
|
|
Karsten Hopp |
6710e6 |
--- 311,322 ----
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
#endif
|
|
Karsten Hopp |
6710e6 |
#ifdef FEAT_MBYTE
|
|
Karsten Hopp |
6710e6 |
! GuiFont wide_font; /* Normal 'guifontwide' font */
|
|
Karsten Hopp |
6710e6 |
! # ifndef FEAT_GUI_GTK
|
|
Karsten Hopp |
6710e6 |
! GuiFont wide_bold_font; /* Bold 'guifontwide' font */
|
|
Karsten Hopp |
6710e6 |
! GuiFont wide_ital_font; /* Italic 'guifontwide' font */
|
|
Karsten Hopp |
6710e6 |
! GuiFont wide_boldital_font; /* Bold-Italic 'guifontwide' font */
|
|
Karsten Hopp |
6710e6 |
! # endif
|
|
Karsten Hopp |
6710e6 |
#endif
|
|
Karsten Hopp |
6710e6 |
#ifdef FEAT_XFONTSET
|
|
Karsten Hopp |
6710e6 |
GuiFontset fontset; /* set of fonts for multi-byte chars */
|
|
Karsten Hopp |
6710e6 |
*** ../vim-7.3.1219/src/gui_w48.c 2013-05-06 04:21:35.000000000 +0200
|
|
Karsten Hopp |
6710e6 |
--- src/gui_w48.c 2013-06-17 22:22:49.000000000 +0200
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 3123,3131 ****
|
|
Karsten Hopp |
6710e6 |
--- 3123,3165 ----
|
|
Karsten Hopp |
6710e6 |
void
|
|
Karsten Hopp |
6710e6 |
gui_mch_wide_font_changed()
|
|
Karsten Hopp |
6710e6 |
{
|
|
Karsten Hopp |
6710e6 |
+ # ifndef MSWIN16_FASTTEXT
|
|
Karsten Hopp |
6710e6 |
+ LOGFONT lf;
|
|
Karsten Hopp |
6710e6 |
+ # endif
|
|
Karsten Hopp |
6710e6 |
+
|
|
Karsten Hopp |
6710e6 |
# ifdef FEAT_MBYTE_IME
|
|
Karsten Hopp |
6710e6 |
update_im_font();
|
|
Karsten Hopp |
6710e6 |
# endif
|
|
Karsten Hopp |
6710e6 |
+
|
|
Karsten Hopp |
6710e6 |
+ # ifndef MSWIN16_FASTTEXT
|
|
Karsten Hopp |
6710e6 |
+ gui_mch_free_font(gui.wide_ital_font);
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_ital_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ gui_mch_free_font(gui.wide_bold_font);
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_bold_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+ gui_mch_free_font(gui.wide_boldital_font);
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_boldital_font = NOFONT;
|
|
Karsten Hopp |
6710e6 |
+
|
|
Karsten Hopp |
6710e6 |
+ if (gui.wide_font
|
|
Karsten Hopp |
6710e6 |
+ && GetObject((HFONT)gui.wide_font, sizeof(lf), &lf))
|
|
Karsten Hopp |
6710e6 |
+ {
|
|
Karsten Hopp |
6710e6 |
+ if (!lf.lfItalic)
|
|
Karsten Hopp |
6710e6 |
+ {
|
|
Karsten Hopp |
6710e6 |
+ lf.lfItalic = TRUE;
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_ital_font = get_font_handle(&lf);
|
|
Karsten Hopp |
6710e6 |
+ lf.lfItalic = FALSE;
|
|
Karsten Hopp |
6710e6 |
+ }
|
|
Karsten Hopp |
6710e6 |
+ if (lf.lfWeight < FW_BOLD)
|
|
Karsten Hopp |
6710e6 |
+ {
|
|
Karsten Hopp |
6710e6 |
+ lf.lfWeight = FW_BOLD;
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_bold_font = get_font_handle(&lf);
|
|
Karsten Hopp |
6710e6 |
+ if (!lf.lfItalic)
|
|
Karsten Hopp |
6710e6 |
+ {
|
|
Karsten Hopp |
6710e6 |
+ lf.lfItalic = TRUE;
|
|
Karsten Hopp |
6710e6 |
+ gui.wide_boldital_font = get_font_handle(&lf);
|
|
Karsten Hopp |
6710e6 |
+ }
|
|
Karsten Hopp |
6710e6 |
+ }
|
|
Karsten Hopp |
6710e6 |
+ }
|
|
Karsten Hopp |
6710e6 |
+ # endif
|
|
Karsten Hopp |
6710e6 |
}
|
|
Karsten Hopp |
6710e6 |
#endif
|
|
Karsten Hopp |
6710e6 |
|
|
Karsten Hopp |
6710e6 |
*** ../vim-7.3.1219/src/version.c 2013-06-17 22:04:34.000000000 +0200
|
|
Karsten Hopp |
6710e6 |
--- src/version.c 2013-06-17 22:24:18.000000000 +0200
|
|
Karsten Hopp |
6710e6 |
***************
|
|
Karsten Hopp |
6710e6 |
*** 730,731 ****
|
|
Karsten Hopp |
6710e6 |
--- 730,733 ----
|
|
Karsten Hopp |
6710e6 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
6710e6 |
+ /**/
|
|
Karsten Hopp |
6710e6 |
+ 1220,
|
|
Karsten Hopp |
6710e6 |
/**/
|
|
Karsten Hopp |
6710e6 |
|
|
Karsten Hopp |
6710e6 |
--
|
|
Karsten Hopp |
6710e6 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
6710e6 |
243. You unsuccessfully try to download a pizza from www.dominos.com.
|
|
Karsten Hopp |
6710e6 |
|
|
Karsten Hopp |
6710e6 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
6710e6 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
6710e6 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
6710e6 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|