From 78e00588a705e0c19d3416f098f4076d756e2e45 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: May 09 2023 07:39:28 +0000 Subject: rhbz#2192915 Japanese font not printed --- diff --git a/0001-tdf-155161-Always-embed-fonts-with-CFF2-table-as-PDF.patch b/0001-tdf-155161-Always-embed-fonts-with-CFF2-table-as-PDF.patch new file mode 100644 index 0000000..906e235 --- /dev/null +++ b/0001-tdf-155161-Always-embed-fonts-with-CFF2-table-as-PDF.patch @@ -0,0 +1,42 @@ +From 79250a55589007930278e3fa59ccdf24c6ff8ea6 Mon Sep 17 00:00:00 2001 +From: Khaled Hosny +Date: Mon, 8 May 2023 16:14:52 +0300 +Subject: [PATCH] tdf#155161: Always embed fonts with CFF2 table as PDF Type 3 + fonts +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +PDF doesn’t support CFF2 table and we currently don’t convert them to +Type 1 (like we do with CFF table), so treat it like fonts with +variations and embed as Type 3 fonts. + +Change-Id: I963b55d5d0ed1470eda157c7e10cae63195a0c91 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151515 +Tested-by: Jenkins +Reviewed-by: Adolfo Jayme Barrientos +--- + vcl/source/gdi/pdfwriter_impl.cxx | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx +index 6b9fb711626a..ce26ea6b1342 100644 +--- a/vcl/source/gdi/pdfwriter_impl.cxx ++++ b/vcl/source/gdi/pdfwriter_impl.cxx +@@ -6283,6 +6283,13 @@ void PDFWriterImpl::registerGlyph(const sal_GlyphId nFontGlyphId, + sal_uInt8& nMappedGlyph, sal_Int32& nMappedFontObject) + { + auto bVariations = !pFace->GetVariations(*pFont).empty(); ++ // tdf#155161 ++ // PDF doesn’t support CFF2 table and we currently don’t convert them to ++ // Type 1 (like we do with CFF table), so treat it like fonts with ++ // variations and embed as Type 3 fonts. ++ if (!pFace->GetRawFontData(HB_TAG('C', 'F', 'F', '2')).empty()) ++ bVariations = true; ++ + if (pFace->IsColorFont() || bVariations) + { + // Font has colors, check if this glyph has color layers or bitmap. +-- +2.40.1 + diff --git a/libreoffice.spec b/libreoffice.spec index b926d90..3b19e7f 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -55,7 +55,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 1%{?libo_prerelease}%{?dist} +Release: 2%{?libo_prerelease}%{?dist} # default new files are: MPLv2 # older files are typically: MPLv2 incorporating work under ASLv2 # nlpsolver is: LGPLv3 @@ -269,6 +269,7 @@ Patch4: 0001-default-to-sifr-for-gnome-light-mode.patch # TODO investigate these Patch5: 0001-aarch64-failing-here.patch Patch6: 0001-include-filename-if-the-test-fails.patch +Patch7: 0001-tdf-155161-Always-embed-fonts-with-CFF2-table-as-PDF.patch # not upstreamed Patch500: 0001-disable-libe-book-support.patch @@ -2249,6 +2250,9 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/LibreOfficeKit %changelog +* Tue May 09 2023 Caolán McNamara - 1:7.5.3.2-2 +- rhbz#2192915 Japanese font not printed + * Thu May 04 2023 Caolán McNamara - 1:7.5.3.2-1 - latest version