Loading ...
Sorry, an error occurred while loading the content.

[vim-multibyte] IME have better use same font as GUI

Expand Messages
  • Yasuhiro Matsumoto
    Hello I think... IME have better use same font as GUI. If I select Select Font from menu, ( or type :set gfn=* ) then vim show ChooseFont two times for a
    Message 1 of 2 , Jan 19, 2000
    • 0 Attachment
      Hello

      I think...
      IME have better use same font as GUI.

      If I select "Select Font" from menu,
      ( or type ":set gfn=*")
      then vim show ChooseFont two times for
      a reason that it select GUI font and IME font.

      So , I made patch.

      Problem: Vim show font dialog two times.
      Solution: IME use same font as GUI.
      Files: src/gui_w32.c

      *** src/gui_w32.c.orig Mon Jan 17 01:42:02 2000
      --- src/gui_w32.c Thu Jan 20 10:13:01 2000
      ***************
      *** 2641,2647 ****
      if (font_name == NULL)
      font_name = lf.lfFaceName;
      #ifdef MULTI_BYTE_IME
      ! get_logfont(&norm_logfont, font_name);
      #endif
      gui_mch_free_font(gui.norm_font);
      gui.norm_font = font;
      --- 2641,2648 ----
      if (font_name == NULL)
      font_name = lf.lfFaceName;
      #ifdef MULTI_BYTE_IME
      ! //get_logfont(&norm_logfont, font_name);
      ! mch_memmove(&norm_logfont, &lf, sizeof(LOGFONT));
      #endif
      gui_mch_free_font(gui.norm_font);
      gui.norm_font = font;
    • Bram Moolenaar
      ... I can see why it goes wrong. Looks like a good fix. How about using: norm_logfont = fh; Instead of: mch_memmove(&norm_logfont, &lf, sizeof(LOGFONT)); Is
      Message 2 of 2 , Jan 20, 2000
      • 0 Attachment
        Yasuhiro Matsumoto wrote:

        > I think...
        > IME have better use same font as GUI.
        >
        > If I select "Select Font" from menu,
        > ( or type ":set gfn=*")
        > then vim show ChooseFont two times for
        > a reason that it select GUI font and IME font.
        >
        > So , I made patch.

        I can see why it goes wrong. Looks like a good fix.

        How about using:

        norm_logfont = fh;

        Instead of:

        mch_memmove(&norm_logfont, &lf, sizeof(LOGFONT));

        Is it OK to copy a LOGFONT?

        --
        GALAHAD: Camelot ...
        LAUNCELOT: Camelot ...
        GAWAIN: It's only a model.
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        --/-/---- Bram Moolenaar ---- Bram@... ---- Bram@... ---\-\--
        \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /
      Your message has been successfully submitted and would be delivered to recipients shortly.