# HG changeset patch # User prr # Date 1295457760 28800 # Node ID 5229d314055673b9067b9607800b9d331c279349 # Parent e1e8a8dd8cd8a1567f3b657570b13a5f2dbde227 6951501: EUDC character is not displayed on Swing Reviewed-by: igor, jgodinez diff -r e1e8a8dd8cd8 -r 5229d3140556 jdk/src/windows/classes/sun/awt/Win32FontManager.java --- a/jdk/src/windows/classes/sun/awt/Win32FontManager.java Wed Jan 19 11:31:27 2011 -0500 +++ b/jdk/src/windows/classes/sun/awt/Win32FontManager.java Wed Jan 19 09:22:40 2011 -0800 @@ -81,6 +81,10 @@ */ private static native String getEUDCFontFile(); + public TrueTypeFont getEUDCFont() { + return eudcFont; + } + public Win32FontManager() { super(); AccessController.doPrivileged(new PrivilegedAction() { @@ -198,7 +202,7 @@ familyToFontListMap, Locale locale); - public synchronized native String getFontPath(boolean noType1Fonts); + protected synchronized native String getFontPath(boolean noType1Fonts); public String[] getDefaultPlatformFont() { diff -r e1e8a8dd8cd8 -r 5229d3140556 jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp --- a/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp Wed Jan 19 11:31:27 2011 -0500 +++ b/jdk/src/windows/native/sun/windows/awt_Win32GraphicsEnv.cpp Wed Jan 19 09:22:40 2011 -0800 @@ -214,6 +214,7 @@ #define EUDCKEY_ZH_CN L"EUDC\\936" #define EUDCKEY_ZH_TW L"EUDC\\950" #define EUDCKEY_KO_KR L"EUDC\\949" +#define EUDCKEY_EN_US L"EUDC\\1252" #define LANGID_JA_JP 0x411 #define LANGID_ZH_CN 0x0804 #define LANGID_ZH_SG 0x1004 @@ -221,6 +222,7 @@ #define LANGID_ZH_HK 0x0c04 #define LANGID_ZH_MO 0x1404 #define LANGID_KO_KR 0x0412 +#define LANGID_EN_US 0x0409 JNIEXPORT jstring JNICALL @@ -237,6 +239,9 @@ LANGID langID = GetSystemDefaultLangID(); //lookup for encoding ID, EUDC only supported in //codepage 932, 936, 949, 950 (and unicode) + // On Windows 7, at least for me, it shows up in Cp1252 if + // I create a custom font. Might as well support that as it makes + // verification easier. if (langID == LANGID_JA_JP) { eudcKey = EUDCKEY_JA_JP; } else if (langID == LANGID_ZH_CN || langID == LANGID_ZH_SG) { @@ -246,6 +251,8 @@ eudcKey = EUDCKEY_ZH_TW; } else if (langID == LANGID_KO_KR) { eudcKey = EUDCKEY_KO_KR; + } else if (langID == LANGID_EN_US) { + eudcKey = EUDCKEY_EN_US; } else { return NULL; }