From eb3768c9f984b80b5a0bdf93b950adae61b0abed Mon Sep 17 00:00:00 2001 From: hdliu Date: Wed, 26 Mar 2025 13:44:52 +0800 Subject: [PATCH] Add CJK Chinese font mappings Signed-off-by: hdliu --- Add-CJK-Chinese-font-mappings.patch | 30 +++++++++++++++++++++++++++++ ghostscript.spec | 7 ++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Add-CJK-Chinese-font-mappings.patch diff --git a/Add-CJK-Chinese-font-mappings.patch b/Add-CJK-Chinese-font-mappings.patch new file mode 100644 index 0000000..124fa03 --- /dev/null +++ b/Add-CJK-Chinese-font-mappings.patch @@ -0,0 +1,30 @@ +From 95691f965811eac16f07de5b2ec741c2609e2086 Mon Sep 17 00:00:00 2001 +From: hdliu +Date: Wed, 26 Mar 2025 13:34:46 +0800 +Subject: [PATCH 2/2] Add CJK font mappings + +Modify the Resource/Init/cidfmap file, add font mappings so that the PS interpreter can rasterize Chinese content using the two fonts STKaiti-Regular and STheiti-Regular. + +Signed-off-by: hdliu +--- + Resource/Init/cidfmap | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/Resource/Init/cidfmap b/Resource/Init/cidfmap +index bed221a..09ce4ae 100644 +--- a/Resource/Init/cidfmap ++++ b/Resource/Init/cidfmap +@@ -45,3 +45,10 @@ + % + % Note the use of a string to cope with the name containing a space. + % ++/BousungEG-Heiti-GB << /FileType /TrueType /Path (/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc) /SubfontID 0 /CSI [(GB1) 4] >> ; ++/BousungEG-Kaiti-GB << /FileType /TrueType /Path (/usr/share/fonts/cjkuni-ukai/ukai.ttc) /SubfontID 1 /CSI [(GB1) 2] >> ; ++ ++ ++/STHeiti-Regular /BousungEG-Heiti-GB ; ++/STKaiti-Regular /BousungEG-Kaiti-GB ; ++ +-- +2.33.0 + diff --git a/ghostscript.spec b/ghostscript.spec index 0aa4bd4..59f6a4d 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -9,7 +9,7 @@ Name: ghostscript Version: 9.55.0 -Release: 9 +Release: 10 Summary: An interpreter for PostScript and PDF files License: AGPLv3+ URL: https://ghostscript.com/ @@ -27,6 +27,7 @@ Patch8: fix-cve-2023-52722.patch Patch9: fix-CVE-2024-29510.patch Patch10: fix-CVE-2024-33869.patch Patch11: fix-CVE-2024-33870.patch +patch12: Add-CJK-Chinese-font-mappings.patch BuildRequires: automake gcc BuildRequires: adobe-mappings-cmap-devel adobe-mappings-pdf-devel @@ -187,6 +188,10 @@ install -m 0755 -d %{buildroot}%{_datadir}/%{name}/conf.d/ %{_bindir}/dvipdf %changelog +* Wed Mar 26 2025 hdliu - 9.55.0-10 +- Add font mappings so that the PS interpreter can rasterize Chinese content using the two fonts STKaiti-Regular and STheiti-Regular. + + * Sun May 26 2024 xuchenchen - 9.55.0-9 - Type:CVE - ID:NA -- Gitee