FS#57024 - [ghostscript] can't find cmap files.

Attached to Project: Arch Linux
Opened by SATO Tatsuya (tattsan) - Tuesday, 09 January 2018, 13:53 GMT
Last edited by Jan Alexander Steffens (heftig) - Tuesday, 09 January 2018, 18:30 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Since 9.22-2, cmaps of ghostscript have been removed.
Instead, /usr/share/poppler/cMap/* were added to fontpath.
But ghostscript can't find cmap files.

Steps to reproduce:
Display sample file with CJK CID fonts. For example,

$ gs /usr/share/ghostscript/9.22/examples/cjk/article9.ps

Before this test, you have to install Japanese fonts.
If you installed otf-ipafont package, you should add the following lines
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/Ryumin-Light << /FileType /TrueType /CSI [(Japan1) 6] /Path (/usr/share/fonts/OTF/ipam.ttf) >> ;
/GothicBBB-Medium << /FileType /TrueType /CSI [(Japan1) 6] /Path (/usr/share/fonts/OTF/ipag.ttf) >> ;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
to the file /usr/share/ghostscript/9.22/Resource/Init/cidfmap .

If gostscript is 9.22-2 or later, you get errors:

--------------------------------------------------------------------------------------------
GPL Ghostscript 9.22 (2017-10-04)
Copyright (C) 2017 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Querying operating system for font files...
Can't find (or can't open) font file /usr/share/ghostscript/9.22/Resource/Font/GothicBBB-Medium-V.
Can't find (or can't open) font file GothicBBB-Medium-V.
Didn't find this font on the system!
Substituting font Courier for GothicBBB-Medium-V.
Loading NimbusMonoPS-Regular font from /usr/share/ghostscript/9.22/Resource/Font/NimbusMonoPS-Regular... 4747712 3397226 17846024 7406073 1 done.
Can't find (or can't open) font file /usr/share/ghostscript/9.22/Resource/Font/Ryumin-Light-V.
Can't find (or can't open) font file Ryumin-Light-V.
Didn't find this font on the system!
Substituting font Courier for Ryumin-Light-V.
Error: /rangecheck in --widthshow--
Operand stack:
0 10.0 8482 (!!!L@oAh$NJ|4~!"@oNO$NITJ];}!"8r@o8"$NH]G'!M)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 2015 1 3 %oparray_pop 2014 1 3 %oparray_pop 1998 1 3 %oparray_pop 1884 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:983/1684(ro)(G)-- --dict:0/20(G)-- --dict:91/200(L)--
Current allocation mode is local
Last OS error: No such file or directory
Current file position is 1932
GPL Ghostscript 9.22: Unrecoverable error, exit code 1
--------------------------------------------------------------------------------------------
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Tuesday, 09 January 2018, 18:30 GMT
Reason for closing:  Fixed
Additional comments about closing:  9.22-7
Comment by SATO Tatsuya (tattsan) - Tuesday, 09 January 2018, 14:19 GMT
And if we remove the following lines from PKGBUILD, no error occurs.

########################################################################
# remove cmaps we already ship in poppler-data
local f
for f in "${pkgdir}"/usr/share/ghostscript/${pkgver}/Resource/CMap/*; do
[[ $f == */Identity* ]] && continue
rm $f
done
########################################################################

So I think ghostscript doesn't use fontpaths to find cmap files.

Loading...