From b744744501888b595cb902cb99ffc91a4ac9cbd0 Mon Sep 17 00:00:00 2001 From: Simon Steiner Date: Wed, 10 Nov 2021 08:50:14 +0000 Subject: FOP-3034: Update PDFBox to 2.0.24 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1894901 13f79535-47bb-0310-9956-ffa450edef68 --- fop-core/pom.xml | 4 +-- .../org/apache/fop/fonts/cff/CFFDataReader.java | 4 +-- .../org/apache/fop/fonts/cff/FOPCFFDataInput.java | 33 +++++++++++++++++++++ fop/lib/fontbox-2.0.21.jar | Bin 1562354 -> 0 bytes fop/lib/fontbox-2.0.24.jar | Bin 0 -> 1564111 bytes 5 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 fop-core/src/main/java/org/apache/fop/fonts/cff/FOPCFFDataInput.java delete mode 100644 fop/lib/fontbox-2.0.21.jar create mode 100644 fop/lib/fontbox-2.0.24.jar diff --git a/fop-core/pom.xml b/fop-core/pom.xml index 8256bac79..915ee6234 100644 --- a/fop-core/pom.xml +++ b/fop-core/pom.xml @@ -92,7 +92,7 @@ org.apache.pdfbox fontbox - 2.0.21 + 2.0.24 javax.media @@ -134,7 +134,7 @@ org.apache.pdfbox pdfbox - 2.0.21 + 2.0.24 test diff --git a/fop-core/src/main/java/org/apache/fop/fonts/cff/CFFDataReader.java b/fop-core/src/main/java/org/apache/fop/fonts/cff/CFFDataReader.java index 34b9a00ca..e9ad9cfed 100644 --- a/fop-core/src/main/java/org/apache/fop/fonts/cff/CFFDataReader.java +++ b/fop-core/src/main/java/org/apache/fop/fonts/cff/CFFDataReader.java @@ -64,7 +64,7 @@ public class CFFDataReader { * @param cffDataArray A byte array which holds the CFF data */ public CFFDataReader(byte[] cffDataArray) throws IOException { - cffData = new CFFDataInput(cffDataArray); + cffData = new FOPCFFDataInput(cffDataArray); readCFFData(); } @@ -74,7 +74,7 @@ public class CFFDataReader { * @param fontFile The font file as represented by a FontFileReader object */ public CFFDataReader(FontFileReader fontFile) throws IOException { - cffData = new CFFDataInput(OTFFile.getCFFData(fontFile)); + cffData = new FOPCFFDataInput(OTFFile.getCFFData(fontFile)); readCFFData(); } diff --git a/fop-core/src/main/java/org/apache/fop/fonts/cff/FOPCFFDataInput.java b/fop-core/src/main/java/org/apache/fop/fonts/cff/FOPCFFDataInput.java new file mode 100644 index 000000000..43fc6b291 --- /dev/null +++ b/fop-core/src/main/java/org/apache/fop/fonts/cff/FOPCFFDataInput.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ +package org.apache.fop.fonts.cff; + +import java.io.IOException; + +import org.apache.fontbox.cff.CFFDataInput; + +public class FOPCFFDataInput extends CFFDataInput { + public FOPCFFDataInput(byte[] buffer) { + super(buffer); + } + + public int readOffSize() throws IOException { + return readUnsignedByte(); + } +} diff --git a/fop/lib/fontbox-2.0.21.jar b/fop/lib/fontbox-2.0.21.jar deleted file mode 100644 index b40ff1522..000000000 Binary files a/fop/lib/fontbox-2.0.21.jar and /dev/null differ diff --git a/fop/lib/fontbox-2.0.24.jar b/fop/lib/fontbox-2.0.24.jar new file mode 100644 index 000000000..e93794c15 Binary files /dev/null and b/fop/lib/fontbox-2.0.24.jar differ -- cgit v1.2.3