Author: ssteiner Date: Tue Jun 30 12:59:45 2020 New Revision: 1879366 URL: http://svn.apache.org/viewvc?rev=1879366&view=rev Log: FOP-2951: Fix findbugs
Modified: xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFBoxAdapter.java Modified: xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFBoxAdapter.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFBoxAdapter.java?rev=1879366&r1=1879365&r2=1879366&view=diff ============================================================================== --- xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFBoxAdapter.java (original) +++ xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFBoxAdapter.java Tue Jun 30 12:59:45 2020 @@ -210,20 +210,7 @@ public class PDFBoxAdapter { mergeXObj(sourcePageResources, fontinfo, uniqueName); PDFDictionary pageResources = (PDFDictionary)cloneForNewDocument(sourcePageResources); - PDFDictionary fontDict = (PDFDictionary)pageResources.get("Font"); - if (fontDict != null && pdfDoc.isMergeFontsEnabled()) { - for (Map.Entry<String, Typeface> fontEntry : fontinfo.getUsedFonts().entrySet()) { - Typeface font = fontEntry.getValue(); - if (font instanceof FOPPDFFont) { - FOPPDFFont pdfFont = (FOPPDFFont)font; - if (pdfFont.getRef() == null) { - pdfFont.setRef(new PDFDictionary()); - pdfDoc.assignObjectNumber(pdfFont.getRef()); - } - fontDict.put(fontEntry.getKey(), pdfFont.getRef()); - } - } - } + updateMergeFontInfo(pageResources, fontinfo); updateXObj(sourcePageResources, pageResources); if (fontsBackup != null) { sourcePageResources.setItem(COSName.FONT, fontsBackup); --------------------------------------------------------------------- To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org