Wrong PostcriptScriptTable due to wrong assumption in Encoding/MacRomanEncoding
-------------------------------------------------------------------------------

                 Key: PDFBOX-1085
                 URL: https://issues.apache.org/jira/browse/PDFBOX-1085
             Project: PDFBox
          Issue Type: Bug
          Components: FontBox
    Affects Versions: 1.6.0
            Reporter: Wulf Berschin


When parsing a PostScriptTable of a TrueType font (Format 2.0: Non-Standard 
(for PostScript) TrueType Glyph Set.) I wondered about the many wrong "space" 
entries for non-whitespace-glyphs for which TTFDump stated ".notdef".

I found out that org.apache.fontbox.encoding.(MacRoman)Encoding.getName() puts 
a "space" when codeToName doesnt find a name.

This method should be changed to return ".notdef" for unknown codes (means code 
with no PSGlyf Name)


    public String getName( int code ) throws IOException
    {
        String name = codeToName.get( code );
        if( name == null )
        {
            name = ".notdef";
        }
        return name;
    }


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to