src/share/classes/sun/font/CMap.java

Print this page
rev 1297 : [mq]: fontmanager.patch

*** 230,240 **** * cmap table, these fonts have EncodingID 4 which is Big5 * encoding according the TrueType spec, but actually the * fonts are using gb2312 encoding, have to use this * workaround to make Solaris zh_CN locale work. -sherman */ ! if (FontManager.isSolaris && font.platName != null && (font.platName.startsWith( "/usr/openwin/lib/locale/zh_CN.EUC/X11/fonts/TrueType") || font.platName.startsWith( "/usr/openwin/lib/locale/zh_CN/X11/fonts/TrueType") || font.platName.startsWith( --- 230,240 ---- * cmap table, these fonts have EncodingID 4 which is Big5 * encoding according the TrueType spec, but actually the * fonts are using gb2312 encoding, have to use this * workaround to make Solaris zh_CN locale work. -sherman */ ! if (FontUtilities.isSolaris && font.platName != null && (font.platName.startsWith( "/usr/openwin/lib/locale/zh_CN.EUC/X11/fonts/TrueType") || font.platName.startsWith( "/usr/openwin/lib/locale/zh_CN/X11/fonts/TrueType") || font.platName.startsWith(
*** 405,416 **** subtableLength = buffer.getChar(offset+2); } else { subtableLength = buffer.getInt(offset+4) & INTMASK; } if (offset+subtableLength > buffer.capacity()) { ! if (FontManager.logging) { ! FontManager.logger.warning("Cmap subtable overflows buffer."); } } switch (subtableFormat) { case 0: return new CMapFormat0(buffer, offset); case 2: return new CMapFormat2(buffer, offset, xlat); --- 405,416 ---- subtableLength = buffer.getChar(offset+2); } else { subtableLength = buffer.getInt(offset+4) & INTMASK; } if (offset+subtableLength > buffer.capacity()) { ! if (FontUtilities.isLogging()) { ! FontUtilities.getLogger().warning("Cmap subtable overflows buffer."); } } switch (subtableFormat) { case 0: return new CMapFormat0(buffer, offset); case 2: return new CMapFormat2(buffer, offset, xlat);