diff options
author | Simon Steiner <ssteiner@apache.org> | 2021-11-10 08:50:14 +0000 |
---|---|---|
committer | Simon Steiner <ssteiner@apache.org> | 2021-11-10 08:50:14 +0000 |
commit | b744744501888b595cb902cb99ffc91a4ac9cbd0 (patch) | |
tree | 3a5da5b1a0c01d0b16d8234a442377819844edfd /fop-core/src | |
parent | 704da0a306539eb5902c2e9385d84f5c47bcb3d8 (diff) | |
download | xmlgraphics-fop-b744744501888b595cb902cb99ffc91a4ac9cbd0.tar.gz xmlgraphics-fop-b744744501888b595cb902cb99ffc91a4ac9cbd0.zip |
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
Diffstat (limited to 'fop-core/src')
-rw-r--r-- | fop-core/src/main/java/org/apache/fop/fonts/cff/CFFDataReader.java | 4 | ||||
-rw-r--r-- | fop-core/src/main/java/org/apache/fop/fonts/cff/FOPCFFDataInput.java | 33 |
2 files changed, 35 insertions, 2 deletions
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(); + } +} |