public String toUnicode(char c1) {
        // the toUnicode map is used for font substitution and especially for CID fonts.  If toUnicode is available
        // we use it as is, if not then we can use the charDiff mapping, which takes care of font encoding
        // differences.
        char c = toUnicode == null ? getCharDiff(c1) : c1;

        // The problem here is that some CMapping only work properly if the
        // embedded font is working properly, so that's how this logic works.

        //System.out.print((int)c + " (" + (char)c + ")");
        // check for CMap ToUnicode properties, if so we return it, no point
        // jumping though the other hoops.
        if (toUnicode != null) {
            return toUnicode.toUnicode(c);
        }
        // otherwise work with a single char
        c = getCMapping(c);
        //System.out.print(" -> " + (int)c + " (" + (char)c + ")");
        //System.out.println();

        // try alternate representation of character
        if (!awtFont.canDisplay(c)) {
            c |= 0xF000;
        }
        // correct the character c if possible
//            if (!textState.font.font.canDisplay(c) && textState.font.font.canDisplay(c1)) {
//                c = c1;
//            }

        // due to different character encoding for invalid embedded fonts
        // the proper font can not always be found
        if (!awtFont.canDisplay(c)) {

            // try and find a similar symbol that can be displayed.
            c = findAlternateSymbol(c);
//                System.out.println(c + " + " + (int) c + " " +
//                                   textState.currentfont.getName() + " " +
//                                   textState.font.font );
        }

        // Debug code, show any undisplayable glyphs
        if (log.isLoggable(Level.FINER)) {
            if (!awtFont.canDisplay(c)) {
                log.finer(
                        ((int) c1) + " " + Character.toString(c1) + " " +
                                (int) c + " " + c + " " + awtFont);
                //+ " " + textState.font.font + " " + textState.font.font.getNumGlyphs());
            }
        }
        return String.valueOf(c);
    }