jdk/src/java.desktop/share/classes/sun/font/TrueTypeGlyphMapper.java
changeset 26037 508779ce6619
parent 26020 68deef2ad1c9
parent 25859 3317bb8137f4
child 40139 76f3dc8c0c28
equal deleted inserted replaced
25992:e9b05e933ddd 26037:508779ce6619
    57         if (cmap == null) {
    57         if (cmap == null) {
    58             handleBadCMAP();
    58             handleBadCMAP();
    59         }
    59         }
    60         missingGlyph = 0; /* standard for TrueType fonts */
    60         missingGlyph = 0; /* standard for TrueType fonts */
    61         ByteBuffer buffer = font.getTableBuffer(TrueTypeFont.maxpTag);
    61         ByteBuffer buffer = font.getTableBuffer(TrueTypeFont.maxpTag);
    62         numGlyphs = buffer.getChar(4); // offset 4 bytes in MAXP table.
    62         if (buffer != null && buffer.capacity() >= 6) {
       
    63             numGlyphs = buffer.getChar(4); // offset 4 bytes in MAXP table.
       
    64         } else {
       
    65             handleBadCMAP();
       
    66         }
    63         if (FontUtilities.isSolaris && isJAlocale && font.supportsJA()) {
    67         if (FontUtilities.isSolaris && isJAlocale && font.supportsJA()) {
    64             needsJAremapping = true;
    68             needsJAremapping = true;
    65             if (FontUtilities.isSolaris8 &&
    69             if (FontUtilities.isSolaris8 &&
    66                 getGlyphFromCMAP(JA_WAVE_DASH_CHAR) == missingGlyph) {
    70                 getGlyphFromCMAP(JA_WAVE_DASH_CHAR) == missingGlyph) {
    67                 remapJAWaveDash = true;
    71                 remapJAWaveDash = true;