You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2014/01/19 12:13:19 UTC
[jira] [Resolved] (PDFBOX-1742) type1CFont font with null encoding
[ https://issues.apache.org/jira/browse/PDFBOX-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Lehmkühler resolved PDFBOX-1742.
----------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
Assignee: Andreas Lehmkühler
@Tilman: Thanks for checking this!
Set to resolved
> type1CFont font with null encoding
> ----------------------------------
>
> Key: PDFBOX-1742
> URL: https://issues.apache.org/jira/browse/PDFBOX-1742
> Project: PDFBox
> Issue Type: Bug
> Components: PDModel
> Affects Versions: 1.8.3, 2.0.0
> Reporter: Tilman Hausherr
> Assignee: Andreas Lehmkühler
> Fix For: 2.0.0
>
> Attachments: PDFBOX-427-bullets-baad.pdf-1.png, PDFBOX-427-bullets-good.pdf-1.png, PDFBOX-427-bullets.pdf
>
>
> The file from PDFBOX-427 does not display the bullets (near "diff" in the right column)
> Through debugging I found out:
> The glyph code to be rendered is 183. That code doesn't exist in the font, however a code 116 exists, and it came from an "sid" code (CFFGlyph2D constructor). A mapping of the name ("bullet") through the nameToCode table isn't done because encoding is null.
> PDSimpleFont.determineEncoding() sets a null encoding
> PDType1Font.determineEncoding() sets a "good" encoding based on getAFM()
> (both called from constructor)
> getAFM() gets an encoding table that includes codetoname/nametocode 183 <=> bullet
> Later, due to having a FontFile3, a new type1CFont is created with the external file, but with no encoding.
> The following change in PDType1Font.java works for me (first line is the existing line):
> {code}
> if (type1CFont.getFontEncoding() == null && getFontEncoding() != null) //TH
> {
> LOG.info("Encoding of Type1CFont '" + type1CFont.getBaseFont() + "' is null, trying Type1Font encoding");
> type1CFont.setFontEncoding(getFontEncoding());
> }
> {code}
> Another improvement is the fat dash (at the beginning of "--use-merge-history" at the bottom of the mid column.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)