class Type0Font extends FontPane
{
    public static final String NO_GLYPH = "No glyph";
    private final FontEncodingView view;
    private int totalAvailableGlyph = 0;
    
    /**
     * Constructor.
     * @param descendantFont PDCIDFontType2 instance.
     * @param parentFont PDFont instance.
     * @throws IOException If fails to parse cidtogid map.
     */
    Type0Font(PDCIDFont descendantFont, PDType0Font parentFont) throws IOException
    {
        Object[][] cidtogid = readCIDToGIDMap(descendantFont, parentFont);
        if (cidtogid != null)
        {
            Map<String, String> attributes = new LinkedHashMap<>();
            attributes.put("Font", descendantFont.getName());
            attributes.put("CIDs", Integer.toString(cidtogid.length));
            attributes.put("Embedded", Boolean.toString(descendantFont.isEmbedded()));

            view = new FontEncodingView(cidtogid, attributes, 
                    new String[]{"CID", "GID", "Unicode Character", "Glyph"}, getYBounds(cidtogid, 3));
        }
        else
        {
            Object[][] tab = readMap(descendantFont, parentFont);
            Map<String, String> attributes = new LinkedHashMap<>();
            attributes.put("Font", descendantFont.getName());
            attributes.put("CIDs", Integer.toString(tab.length));
            attributes.put("Glyphs", Integer.toString(totalAvailableGlyph));
            attributes.put("Standard 14", Boolean.toString(parentFont.isStandard14()));
            attributes.put("Embedded", Boolean.toString(descendantFont.isEmbedded()));

            view = new FontEncodingView(tab, attributes, 
                    new String[]{"Code", "CID", "GID", "Unicode Character", "Glyph"}, getYBounds(tab, 4));
        }
    }

    private Object[][] readMap(PDCIDFont descendantFont, PDType0Font parentFont) throws IOException
    {
        int codes = 0;
        for (int code = 0; code < 65535; ++code)
        {
            if (descendantFont.hasGlyph(code))
            {
                ++codes;
            }
        }
        Object[][] tab = new Object[codes][5];
        int index = 0;
        for (int code = 0; code < 65535; ++code)
        {
            if (descendantFont.hasGlyph(code))
            {
                tab[index][0] = code;
                tab[index][1] = descendantFont.codeToCID(code);
                tab[index][2] = descendantFont.codeToGID(code);
                tab[index][3] = parentFont.toUnicode(code);
                GeneralPath path = descendantFont.getPath(code);
                tab[index][4] = path;
                if (!path.getBounds2D().isEmpty())
                {
                    ++totalAvailableGlyph;
                }
                ++index;
            }
        }
        return tab;
    }

    private Object[][] readCIDToGIDMap(PDCIDFont font, PDFont parentFont) throws IOException
    {
        Object[][] cid2gid = null;
        COSDictionary dict = font.getCOSObject();
        COSStream stream = dict.getCOSStream(COSName.CID_TO_GID_MAP);
        if (stream != null)
        {
            InputStream is = stream.createInputStream();
            byte[] mapAsBytes = is.readAllBytes();
            IOUtils.closeQuietly(is);
            int numberOfInts = mapAsBytes.length / 2;
            cid2gid = new Object[numberOfInts][4];
            int offset = 0;
            for (int index = 0; index < numberOfInts; index++)
            {
                int gid = (mapAsBytes[offset] & 0xff) << 8 | mapAsBytes[offset + 1] & 0xff;
                cid2gid[index][0] = index;
                cid2gid[index][1] = gid;
                if (gid != 0 && parentFont.toUnicode(index) != null)
                {
                    cid2gid[index][2] = parentFont.toUnicode(index);
                }
                GeneralPath path = font.getPath(index);
                cid2gid[index][3] = path;
                if (!path.getBounds2D().isEmpty())
                {
                    ++totalAvailableGlyph;
                }
                offset += 2;
            }
        }
        return cid2gid;
    }

    @Override
    public JPanel getPanel()
    {<FILL_FUNCTION_BODY>}
}

        if (view != null)
        {
            return view.getPanel();
        }
        JPanel panel = new JPanel();
        panel.setPreferredSize(new Dimension(300, 500));
        return panel;
    
<no_super_class>