bug#68339: [patch] Set the IME window font to an appropriate size
Eli Zaretskii <[email protected]> Sun, 02 Aug 2026 18:51:51 +0300
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> From: dANiuu zHaO <[email protected]> > Date: Sun, 2 Aug 2026 23:27:31 +0800 > Cc: [email protected] > > You were right. I only needed to build it once locally and it worked perfectly — exactly as you described, with no > errors at all. There's a new patch and a GIF attached to demonstrate my current work. > Everything works fine on my local machine, but it will likely need more testing from others. Lastly, thank you for > your guidance — without it, it would have taken me much longer to figure out the root cause. Yes, more testing is a good idea. Would people who have IME installed on their Windows systems please apply the patch, try using IME, and report back? > Finally, I agree to sign the copyright-assignment agreement. Thanks, form sent off-list. > + face = FACE_FROM_ID (f, lookup_basic_face (w, f, DEFAULT_FACE_ID)); > + GetObjectW (FONT_HANDLE (face->font), sizeof (lf), &lf); Please add the fallback here, in case something goes wrong. Specifically, if either 'face' or face->font is NULL, we should use FRAME_FONT as fallback. Also, please use FACE_FROM_ID_OR_NULL instead of FACE_FROM_ID, because the latter will hit assert violation if the result is NULL, whereas we want to handle that ourselves here.