Return-Path: X-Original-To: apmail-pdfbox-dev-archive@www.apache.org Delivered-To: apmail-pdfbox-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4BC0F109FD for ; Mon, 20 Jan 2014 18:23:24 +0000 (UTC) Received: (qmail 77588 invoked by uid 500); 20 Jan 2014 18:23:23 -0000 Delivered-To: apmail-pdfbox-dev-archive@pdfbox.apache.org Received: (qmail 77561 invoked by uid 500); 20 Jan 2014 18:23:22 -0000 Mailing-List: contact dev-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list dev@pdfbox.apache.org Received: (qmail 77549 invoked by uid 99); 20 Jan 2014 18:23:21 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Jan 2014 18:23:21 +0000 Date: Mon, 20 Jan 2014 18:23:21 +0000 (UTC) From: "John Hewson (JIRA)" To: dev@pdfbox.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PDFBOX-1646) [PATCH] Add method for retrieving CFF bounding box from CFFFont class with slight refactoring and optimization. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PDFBOX-1646?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D138= 76653#comment-13876653 ]=20 John Hewson commented on PDFBOX-1646: ------------------------------------- getGlyphNameFromCode doesn't ad d any new functionality that isn't already = provided by Mapping, you can just etrieve the mapping and look up the name= . These can be cached within FOP if you require frequent access to them. > [PATCH] Add method for retrieving CFF bounding box from CFFFont class wit= h 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=C3=BChler > Attachments: patch-optimize.diff, patch.diff > > > I have added a method to the CFFFont class to retrieve the bounding box f= or a character determined by an SID as well as retrieving a name. I have al= so slightly modified the existing code so that each sid mapping can be retr= ieved now using the SID as the key from a map. From looking around there ar= e several examples of where iterative loops are used using the original map= ping 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 retr= ieve a renderer from two locations. These patches are part of adding OTF CF= F support to Apache FOP. -- This message was sent by Atlassian JIRA (v6.1.5#6160)