bug#68339: [patch] Set the IME window font to an appropriate size
dANiuu zHaO <[email protected]> Mon, 3 Aug 2026 00:10:58 +0800
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <CAEOE9jch-r4TUJUWtqNv=OPEM3jVskBKYZGyjaSAMvgo-2E61g@mail.gmail.com> |
--0000000000008279af065812ab47 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, more testing is a good idea. I will share and distribute these patches in the Emacs communities I know, and I hope more people can help test them. As for the code suggestions, I will send an improved patch shortly. Finally, I have signed the form and am waiting for a response. Thanks. Eli Zaretskii <[email protected]> =E4=BA=8E2026=E5=B9=B48=E6=9C=882=E6=97=A5=E5= =91=A8=E6=97=A5 23:52=E5=86=99=E9=81=93=EF=BC=9A > > 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 =E2=80=94 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 =E2=80=94 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 =3D 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. > --0000000000008279af065812ab47 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Yes, more testing is a good idea. I will share and distrib= ute these patches in the Emacs communities I know, and I hope more people c= an help test them.<br><br>As for the code suggestions, I will send an impro= ved patch shortly.<div><br><div>Finally, I have signed the form and am wait= ing for a response.<br>Thanks.</div></div></div><br><div class=3D"gmail_quo= te gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">Eli Zaretsk= ii <<a href=3D"mailto:[email protected]">[email protected]</a>> =E4=BA=8E2026= =E5=B9=B48=E6=9C=882=E6=97=A5=E5=91=A8=E6=97=A5 23:52=E5=86=99=E9=81=93=EF= =BC=9A<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0= px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> From= : dANiuu zHaO <<a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a>><br> > Date: Sun, 2 Aug 2026 23:27:31 +0800<br> > Cc: <a href=3D"mailto:[email protected]" target=3D"_blank">68339@d= ebbugs.gnu.org</a><br> > <br> > You were right. I only needed to build it once locally and it worked p= erfectly =E2=80=94 exactly as you described, with no<br> > errors at all. There's a new patch and a GIF attached to demonstra= te my current work.<br> > Everything works fine on my local machine, but it will likely need mor= e testing from others. Lastly, thank you for<br> > your guidance =E2=80=94 without it, it would have taken me much longer= to figure out the root cause.<br> <br> Yes, more testing is a good idea.=C2=A0 Would people who have IME installed= <br> on their Windows systems please apply the patch, try using IME, and<br> report back?<br> <br> > Finally, I agree to sign the copyright-assignment agreement.<br> <br> Thanks, form sent off-list.<br> <br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0face =3D FACE_FROM_ID (f, lookup_basic_fac= e (w, f, DEFAULT_FACE_ID));<br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0GetObjectW (FONT_HANDLE (face->font), s= izeof (lf), &lf);<br> <br> Please add the fallback here, in case something goes wrong.<br> Specifically, if either 'face' or face->font is NULL, we should = use<br> FRAME_FONT as fallback.<br> <br> Also, please use FACE_FROM_ID_OR_NULL instead of FACE_FROM_ID, because<br> the latter will hit assert violation if the result is NULL, whereas we<br> want to handle that ourselves here.<br> </blockquote></div> --0000000000008279af065812ab47--