[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

[MD:1822]IME font control on Windows2000.



Keiichi Suzuki <keiichi@xxxxxxxxx> writes:

> >>>>> meadow-develop の No. 1820
> >>>>> Message-Id: <uitvbb4ck.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> で、
> >>>>> "himi" == MIYASHITA Hisashi(宮下 尚:HIMI) <himi@xxxxxxxxxxxxxxxxxxxxxxxxx>さま曰く...
> 
> himi> Keiichi Suzuki <keiichi@xxxxxxxxx> writes:
> >> ずいぶん前に meadow-users-jp の方で出た話なのですが、 Windows2000 +
> >> MS-IME2000 という環境で IME で変換中の font の制御がうまくいかないという
> >> 話があったのですが、これを直すのは大変(or まだ手をつけたくない)でしょうか?
> 
> himi> 私はいい加減なんで、どうでも良いと思うと、この程度の問題は見なかっ
> himi> たことにしてしまいます。^^;;;;
> 
> 見栄えってやつは、気になり始めると結構気になったりします。
> ;; そのうち忘れたりしますが。
...
> Subject: Select-Frame problem
> Transaction: Bug report
> Status: pending
> 
> は、いかんせん気持ち悪いので... ^^;;;

暇つぶしに対処しました。(別に暇な時間なんて全然ないんだけど。
この問題もそろそろうっとおしくなってきましたんで。)
試してみてください。

### MicrosoftもIMEの仕様、曖昧なままなのも、そろそろやめて欲しいなぁ。:-P

2000-06-28  MIYASHITA Hisashi  <himi@xxxxxxxxxxxxxxxxxxxxxxxxx>

	* mw32term.h (WM_MULE_IMM_SET_COMPOSITION_FONT): New macro.
	(WM_MULE_IMM_SET_COMPOSITION_FONT_REPLY): likewise.

	* mw32fns.c (w32_WndProc): Modify test code on
	w32_set_ime_font() to check the facility of
	ImmSetCompositionFont.
	(w32_WndProc[WM_MULE_IMM_SET_COMPOSITION_FONT):
	This message invokes w32_set_ime_font().
	(w32_set_frame_ime_font):
	Send a message instead of setting the composition font
	of IME directly.

from himi

Index: mw32fns.c
===================================================================
RCS file: g:/repdev/Meadow/src/mw32fns.c,v
retrieving revision 1.20
diff -c -r1.20 mw32fns.c
*** mw32fns.c	2000/04/09 10:55:21	1.20
--- mw32fns.c	2000/06/28 05:56:23
***************
*** 1330,1335 ****
--- 1330,1336 ----
       Lisp_Object arg, oldval;
  {
    fs_fonts *fs;
+   MSG msg;
    CHECK_STRING (arg, 0);
  
    fs = mw32_get_font(XSTRING(arg)->data);
***************
*** 1337,1342 ****
--- 1338,1351 ----
      {
        error("Font`%s' does not exist.", XSTRING(arg)->data);
      }
+   SEND_INFORM_MESSAGE(FRAME_W32_WINDOW(f),
+ 		      WM_MULE_IMM_SET_COMPOSITION_FONT,
+ 		      (WPARAM) f,
+ 		      (LPARAM) get_logfont(fs, 0));
+ #if 0
+   WAIT_REPLY_MESSAGE(&msg, WM_MULE_IMM_SET_COMPOSITION_FONT_REPLY);
+ #endif
+ 				 
    w32_set_ime_font(FRAME_W32_WINDOW(f),
  		   get_logfont(fs, 0));
  }
***************
*** 2290,2299 ****
  #if 0
  #ifdef IME_CONTROL
      w32_set_ime_font(hwnd, 
! 		     get_logfont(FRAME_FONTSET(f),
! 				 f->output_data.w32->font->fs_font, 
! 				 f->output_data.w32->font->
! 				 property_index));
  #endif
  #endif
  
--- 2299,2305 ----
  #if 0
  #ifdef IME_CONTROL
      w32_set_ime_font(hwnd, 
! 		     get_logfont(f->output_data.w32->font, 0));
  #endif
  #endif
  
***************
*** 2576,2581 ****
--- 2582,2593 ----
  	return 0;
        }
  #endif /* not W32_VER4 */
+   case WM_MULE_IMM_SET_COMPOSITION_FONT:
+     w32_set_ime_font(hwnd, (LPLOGFONT) lParam);
+     POST_THREAD_INFORM_MESSAGE(main_thread_id,
+ 			       WM_MULE_IMM_SET_COMPOSITION_FONT_REPLY,
+ 			       (WPARAM) 0, (LPARAM) 0);
+     break;
  #endif /* not MEADOW and IME_CONTROL */
  
      /* Emacs private message entries. */

Index: mw32term.h
===================================================================
RCS file: g:/repdev/Meadow/src/mw32term.h,v
retrieving revision 1.5
diff -c -r1.5 mw32term.h
*** mw32term.h	1999/09/28 08:29:12	1.5
--- mw32term.h	2000/06/28 00:45:54
***************
*** 735,740 ****
--- 735,743 ----
  #define WM_MULE_IME_DESTROY_AGENT_REPLY (WM_USER+2403)
  #define CONVAGENT_CLASS "ConvAgent"
  
+ #define WM_MULE_IMM_SET_COMPOSITION_FONT       (WM_USER+2404)
+ #define WM_MULE_IMM_SET_COMPOSITION_FONT_REPLY (WM_USER+2405)
+ 
  #endif
  
  extern void w32_fill_rect () ;