You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Robert Meyer (JIRA)" <ji...@apache.org> on 2013/12/02 16:23:36 UTC

[jira] [Updated] (PDFBOX-1646) [PATCH] Add method for retrieving CFF bounding box from CFFFont class with slight refactoring and optimization.

     [ https://issues.apache.org/jira/browse/PDFBOX-1646?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Meyer updated PDFBOX-1646:
---------------------------------

    Attachment: patch-optimize.diff

I've added another patch for this issue related to PDFBOX-1645 to retrieve the bounding box for a glyph from the CharStringRenderer. This is to get the FOP project using a release version of fontbox with relation to adding OTF CFF support. There are several changes which make the patch larger than I wanted because there were several lines which trailing spaces which my IDE cuts off when it saves.

As always comments, suggestions are welcome. Thanks!

> [PATCH] Add method for retrieving CFF bounding box from CFFFont class with slight refactoring and optimization.
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-1646
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1646
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: FontBox
>    Affects Versions: 1.8.2
>            Reporter: Robert Meyer
>            Assignee: Andreas Lehmkühler
>             Fix For: 2.0.0
>
>         Attachments: patch-optimize.diff, patch.diff
>
>
> I have added a method to the CFFFont class to retrieve the bounding box for a character determined by an SID as well as retrieving a name. I have also slightly modified the existing code so that each sid mapping can be retrieved now using the SID as the key from a map. From looking around there are several examples of where iterative loops are used using the original mapping array:
> CFFFontROS.java:165
> CFFParser.java:876
> I haven't changed those locations yet, but they can be made in a separate patch which should boost performance.
> There was a small bit of refactoring done as well just because I now retrieve a renderer from two locations. These patches are part of adding OTF CFF support to Apache FOP.



--
This message was sent by Atlassian JIRA
(v6.1#6144)