--- old/src/java.desktop/share/classes/sun/font/TrueTypeFont.java 2017-01-04 15:55:30.000000000 -0800 +++ new/src/java.desktop/share/classes/sun/font/TrueTypeFont.java 2017-01-04 15:55:30.000000000 -0800 @@ -99,6 +99,10 @@ public static final int ottoTag = 0x4f54544f; // 'otto' - OpenType font /* -- ID's used in the 'name' table */ + public static final int MAC_PLATFORM_ID = 1; + public static final int MACROMAN_SPECIFIC_ID = 0; + public static final int MACROMAN_ENGLISH_LANG = 0; + public static final int MS_PLATFORM_ID = 3; /* MS locale id for US English is the "default" */ public static final short ENGLISH_LOCALE_ID = 0x0409; // 1033 decimal @@ -1108,7 +1112,12 @@ metrics[offset+3] = ulSize * pointSize; } - private String makeString(byte[] bytes, int len, short encoding) { + private String makeString(byte[] bytes, int len, + short platformID, short encoding) { + + if (platformID == MAC_PLATFORM_ID) { + encoding = -1; // hack so we can re-use the code below. + } /* Check for fonts using encodings 2->6 is just for * some old DBCS fonts, apparently mostly on Solaris. @@ -1130,6 +1139,7 @@ String charset; switch (encoding) { + case -1: charset = "US-ASCII";break; case 1: charset = "UTF-16"; break; // most common case first. case 0: charset = "UTF-16"; break; // symbol uses this case 2: charset = "SJIS"; break; @@ -1175,7 +1185,8 @@ for (int i=0; i