static boolean remapGlyph(PdfFont currentFontData, GlyphData glyphData){
        boolean alreadyRemaped=false;
        final String charGlyph= currentFontData.getMappedChar(glyphData.getRawInt(), false);
        if(charGlyph!=null){
            final int newRawInt=currentFontData.getDiffChar(charGlyph);
            if(newRawInt!=-1){
                glyphData.setRawInt(newRawInt); //only reassign if not -1 as messes up code further down
                glyphData.setDisplayValue(String.valueOf((char)newRawInt));
                //fix for PDFdata/sample_pdfs_html/general-July2012/klar--men-aldri-ferdig_dacecc.pdf
                //in some examples the unicode table is wrong and maps the character into this odd range, but the glyph is always correct
                //this is a sanity check to fix this mapping issue
            }else if(!glyphData.getDisplayValue().isEmpty() && glyphData.getDisplayValue().charAt(0)<32){
                final int altValue=StandardFonts.getAdobeMap(charGlyph);
                //this test can return -1 for invalid value as in sample_pdfs_html/general-May2014/18147.pdf
                //which breaks code further down so we reject this value
                if(altValue>-1) {
                    glyphData.setRawInt(altValue);
                    glyphData.set(String.valueOf((char) altValue));
                    alreadyRemaped = true;
                }
            }
        }
        return alreadyRemaped;
    }
static boolean remapGlyph(PdfFont currentFontData, GlyphData glyphData){
        boolean alreadyRemaped=false;
        final String charGlyph= currentFontData.getMappedChar(glyphData.getRawInt(), false);
        if(charGlyph!=null){
            final int newRawInt=currentFontData.getDiffChar(charGlyph);
            if(newRawInt!=-1){
                glyphData.setRawInt(newRawInt);
                glyphData.setDisplayValue(String.valueOf((char)newRawInt));
               
               
               
            }else if(!glyphData.getDisplayValue().isEmpty() && glyphData.getDisplayValue().charAt(0)<32){
                final int altValue=StandardFonts.getAdobeMap(charGlyph);
               
               
                if(altValue>-1) {
                    glyphData.setRawInt(altValue);
                    glyphData.set(String.valueOf((char) altValue));
                    alreadyRemaped = true;
                }
            }
        }
        return alreadyRemaped;
    }
static boolean remapglyph(pdffont currentfontdata, glyphdata glyphdata){ boolean alreadyremaped=false; final string charglyph= currentfontdata.getmappedchar(glyphdata.getrawint(), false); if(charglyph!=null){ final int newrawint=currentfontdata.getdiffchar(charglyph); if(newrawint!=-1){ glyphdata.setrawint(newrawint); glyphdata.setdisplayvalue(string.valueof((char)newrawint)); }else if(!glyphdata.getdisplayvalue().isempty() && glyphdata.getdisplayvalue().charat(0)<32){ final int altvalue=standardfonts.getadobemap(charglyph); if(altvalue>-1) { glyphdata.setrawint(altvalue); glyphdata.set(string.valueof((char) altvalue)); alreadyremaped = true; } } } return alreadyremaped; }