From 1e8099727ccdb5d42dc0a2e0775fed0000e149c5 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Mon, 12 Aug 2024 23:20:46 +0200 Subject: [PATCH 1/2] Clarify the licensing policy --- LICENSE.md | 5 +++++ README.md | 5 +++++ openpdf-fonts-extra/src/main/resources/META-INF/LICENSES.md | 5 +++++ openpdf/src/main/resources/META-INF/LICENSES.md | 5 +++++ pdf-swing/src/main/resources/META-INF/LICENSES.md | 5 +++++ pdf-toolbox/src/main/resources/META-INF/LICENSES.md | 5 +++++ 6 files changed, 30 insertions(+) diff --git a/LICENSE.md b/LICENSE.md index 68af4bfa6c..5aaf5b922e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -2,6 +2,11 @@ ## Licenses of OpenPDF +OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 +or GNU Lesser General Public License 2.1. + +The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` + ### Mozilla Public License Version 2.0 Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file diff --git a/README.md b/README.md index 56cd92c4f3..3a6046bb2c 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,11 @@ Add this to your pom.xml file to use the latest version of OpenPDF: ## License +OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 +or GNU Lesser General Public License 2.1. + +The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` + [GNU Lesser General Public License (LGPL), Version 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1) > For a short explanation see https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License diff --git a/openpdf-fonts-extra/src/main/resources/META-INF/LICENSES.md b/openpdf-fonts-extra/src/main/resources/META-INF/LICENSES.md index 3acc9b9a8b..3c9b8798b9 100644 --- a/openpdf-fonts-extra/src/main/resources/META-INF/LICENSES.md +++ b/openpdf-fonts-extra/src/main/resources/META-INF/LICENSES.md @@ -2,6 +2,11 @@ ## Licenses of OpenPDF +OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 +or GNU Lesser General Public License 2.1. + +The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` + ### Mozilla Public License Version 2.0 Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file diff --git a/openpdf/src/main/resources/META-INF/LICENSES.md b/openpdf/src/main/resources/META-INF/LICENSES.md index 3acc9b9a8b..3c9b8798b9 100644 --- a/openpdf/src/main/resources/META-INF/LICENSES.md +++ b/openpdf/src/main/resources/META-INF/LICENSES.md @@ -2,6 +2,11 @@ ## Licenses of OpenPDF +OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 +or GNU Lesser General Public License 2.1. + +The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` + ### Mozilla Public License Version 2.0 Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file diff --git a/pdf-swing/src/main/resources/META-INF/LICENSES.md b/pdf-swing/src/main/resources/META-INF/LICENSES.md index 3acc9b9a8b..3c9b8798b9 100644 --- a/pdf-swing/src/main/resources/META-INF/LICENSES.md +++ b/pdf-swing/src/main/resources/META-INF/LICENSES.md @@ -2,6 +2,11 @@ ## Licenses of OpenPDF +OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 +or GNU Lesser General Public License 2.1. + +The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` + ### Mozilla Public License Version 2.0 Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file diff --git a/pdf-toolbox/src/main/resources/META-INF/LICENSES.md b/pdf-toolbox/src/main/resources/META-INF/LICENSES.md index 3acc9b9a8b..3c9b8798b9 100644 --- a/pdf-toolbox/src/main/resources/META-INF/LICENSES.md +++ b/pdf-toolbox/src/main/resources/META-INF/LICENSES.md @@ -2,6 +2,11 @@ ## Licenses of OpenPDF +OpenPDF uses dual licensing: when using the library, you may choose either Mozilla Public License Version 2.0 +or GNU Lesser General Public License 2.1. + +The SPDX license identifier for OpenPDF licensing is `MPL-2.0 OR LGPL-2.1+` + ### Mozilla Public License Version 2.0 Please see https://www.mozilla.org/en-US/MPL/2.0/ or the attached file From d89bf2d171bb17bc49b55bcd68a0fbbc29f94427 Mon Sep 17 00:00:00 2001 From: Volker Kunert <39316085+vk-github18@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:13:13 +0200 Subject: [PATCH 2/2] Update LayoutProcessor.java/ See #1159 Load only TrueTypeFontUnicode fonts See #1159 --- .../src/main/java/com/lowagie/text/pdf/LayoutProcessor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpdf/src/main/java/com/lowagie/text/pdf/LayoutProcessor.java b/openpdf/src/main/java/com/lowagie/text/pdf/LayoutProcessor.java index 7b7d90240f..d65091169c 100644 --- a/openpdf/src/main/java/com/lowagie/text/pdf/LayoutProcessor.java +++ b/openpdf/src/main/java/com/lowagie/text/pdf/LayoutProcessor.java @@ -270,6 +270,8 @@ public static boolean supportsFont(BaseFont baseFont) { /** * Loads the AWT font needed for layout + *

+ * If baseFont is not instanceof TrueTypeFontUnicode *no* font is loaded. * * @param baseFont OpenPdf base font * @param filename of the font file @@ -279,7 +281,9 @@ public static void loadFont(BaseFont baseFont, String filename) { if (!enabled || awtFontMap.get(baseFont) != null) { return; } - + if (!(baseFont instanceof TrueTypeFontUnicode)) { + return; + } java.awt.Font awtFont; InputStream inputStream = null; try {