--- old/src/java.desktop/share/classes/sun/font/TrueTypeGlyphMapper.java 2020-05-20 18:01:51.288210598 -0700 +++ new/src/java.desktop/share/classes/sun/font/TrueTypeGlyphMapper.java 2020-05-20 18:01:50.952204146 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,7 +38,6 @@ * apparently expected there. */ static final boolean isJAlocale = Locale.JAPAN.equals(Locale.getDefault()); - private final boolean needsJAremapping; TrueTypeFont font; CMap cmap; @@ -61,11 +60,6 @@ } else { handleBadCMAP(); } - if (FontUtilities.isSolaris && isJAlocale && font.supportsJA()) { - needsJAremapping = true; - } else { - needsJAremapping = false; - } } public int getNumGlyphs() { @@ -141,62 +135,31 @@ } public int charToGlyph(char unicode) { - if (needsJAremapping) { - unicode = remapJAChar(unicode); - } int glyph = getGlyphFromCMAP(unicode); - if (font.checkUseNatives() && glyph < font.glyphToCharMap.length) { - font.glyphToCharMap[glyph] = unicode; - } return glyph; } public int charToGlyph(int unicode) { - if (needsJAremapping) { - unicode = remapJAIntChar(unicode); - } int glyph = getGlyphFromCMAP(unicode); - if (font.checkUseNatives() && glyph < font.glyphToCharMap.length) { - font.glyphToCharMap[glyph] = (char)unicode; - } return glyph; } @Override public int charToVariationGlyph(int unicode, int variationSelector) { - if (needsJAremapping) { - unicode = remapJAIntChar(unicode); - } int glyph = getGlyphFromCMAP(unicode, variationSelector); - if (font.checkUseNatives() && glyph < font.glyphToCharMap.length) { - font.glyphToCharMap[glyph] = (char)unicode; - } return glyph; } public void charsToGlyphs(int count, int[] unicodes, int[] glyphs) { for (int i=0;i= HI_SURROGATE_START && code <= HI_SURROGATE_END && i < count - 1) { @@ -215,11 +178,6 @@ } glyphs[i] = getGlyphFromCMAP(code); - if (font.checkUseNatives() && - glyphs[i] < font.glyphToCharMap.length) { - font.glyphToCharMap[glyphs[i]] = (char)code; - } - } } @@ -231,12 +189,7 @@ public boolean charsToGlyphsNS(int count, char[] unicodes, int[] glyphs) { for (int i=0; i= HI_SURROGATE_START && code <= HI_SURROGATE_END && i < count - 1) { @@ -251,10 +204,6 @@ } glyphs[i] = getGlyphFromCMAP(code); - if (font.checkUseNatives() && - glyphs[i] < font.glyphToCharMap.length) { - font.glyphToCharMap[glyphs[i]] = (char)code; - } if (code < FontUtilities.MIN_LAYOUT_CHARCODE) { continue;