< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Component.cpp

Print this page

        

@@ -3870,10 +3870,15 @@
     HIMC hIMC = ImmGetContext(hwnd);
     if (hIMC == NULL) {
         return;
     }
     COMPOSITIONFORM cf = {CFS_DEFAULT, {0, 0}, {0, 0, 0, 0}};
+    LOGFONT lf;
+    HFONT hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
+    if (GetObject(hFont, sizeof(lf), (LPVOID)&lf) == sizeof(lf)) {
+        ImmSetCompositionFont(hIMC, &lf);
+    }
     ImmSetCompositionWindow(hIMC, &cf);
     ImmReleaseContext(hwnd, hIMC);
 }
 
 void AwtComponent::OpenCandidateWindow(int x, int y)
< prev index next >