Bug 229211 - print/ghostscript9-agpl-base does not work with Japanese language
Summary: print/ghostscript9-agpl-base does not work with Japanese language
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Document Engineering Group (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-21 16:24 UTC by katsuyoshi.ohara
Modified: 2018-06-26 17:22 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (doceng)


Attachments
sample file containing Japanese characters (19.04 KB, application/postscript)
2018-06-22 02:36 UTC, katsuyoshi.ohara
no flags Details
patch-Resource_Init_cidfmap (2.63 KB, patch)
2018-06-22 20:31 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description katsuyoshi.ohara 2018-06-21 16:24:56 UTC
Ghostscript9-agpl does not work with Japanese language because important patches in ghostscript9-agpl-base/files are removed.  They are necessary to deal with Japanese language.  Please restore all patches or revert to version 9.16.
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2018-06-21 18:18:08 UTC
Can you provide a sample document and the ghostscript commands you run on it to show the problem?
Comment 2 katsuyoshi.ohara 2018-06-22 02:36:48 UTC
Created attachment 194473 [details]
sample file containing Japanese characters

OK, I attach a sample "mytest.ps"

Under version 9.16, the command "gs mytest.ps" outputs

GPL Ghostscript 9.16 (2015-03-30)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Querying operating system for font files...
Loading a TT font from /usr/local/share/ghostscript/fonts/GothicBBB-Medium to emulate a CID font GothicBBB-Medium ... Done.
Loading a TT font from /usr/local/share/ghostscript/fonts/Ryumin-Light to emulate a CID font Ryumin-Light ... Done.

Here Ryumin-Light and GothicBBB-Medium are canonical font names in Japanese language because historical reason.
Sometimes they are aliases of other fonts. (e.g. Adobe Reader regards it as )

However version 9.23 cannot resolve them.

GPL Ghostscript 9.23 (2018-03-21)
Copyright (C) 2018 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/local/share/ghostscript/9.23/Resource/Font/GothicBBB-Medium-H.
Can't find (or can't open) font file GothicBBB-Medium-H.
Didn't find this font on the system!
Substituting font Courier for GothicBBB-Medium-H.
Loading NimbusMonoPS-Regular font from /usr/local/share/ghostscript/9.23/Resource/Font/NimbusMonoPS-Regular... 4656912 3143870 11597492 10103528 1 done.
Can't find (or can't open) font file /usr/local/share/ghostscript/9.23/Resource/Font/Ryumin-Light-H.
Can't find (or can't open) font file Ryumin-Light-H.
Didn't find this font on the system!
Substituting font Courier for Ryumin-Light-H.
Comment 3 Tijl Coosemans freebsd_committer freebsd_triage 2018-06-22 20:31:48 UTC
Created attachment 194511 [details]
patch-Resource_Init_cidfmap

Adding this patch to print/ghostscript9-agpl-base fixes the example for me.  Please give it a try and let me know if anything is still wrong.
Comment 4 katsuyoshi.ohara 2018-06-25 16:31:08 UTC
I think you should read all patches in version 9.16.
For example, in version 9.16, FAPIcidmap was modified.
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2018-06-25 21:40:15 UTC
(In reply to katsuyoshi.ohara from comment #4)
As far as I can tell the FAPI* configuration files are only used in combination with UFST, a commercial font renderer from Monotype.  Since we don't (and can't) build Ghostscript with UFST support these files can be ignored.
Comment 6 commit-hook freebsd_committer freebsd_triage 2018-06-26 17:15:52 UTC
A commit references this bug:

Author: tijl
Date: Tue Jun 26 17:15:39 UTC 2018
New revision: 473400
URL: https://svnweb.freebsd.org/changeset/ports/473400

Log:
  - Restore patch that adds mappings for common CJK TeX fonts to cidfmap.
    Make the path in the mappings relative to LOCALBASE/share/fonts so
    print/gsfonts does not need to be installed. [1]
  - Remove --enable-threadsafe from CONFIGURE_ARGS so thread-unsafe devices
    like opvp (used by Canon printer drivers) are built. [2]
  - Fix detection of dlopen on FreeBSD < 11.2 (which doesn't have libdl). [2]
  - Remove reference to FAPI configuration from pkg-message.  As far as I
    can tell it is only useful in combination with UFST, a commercial font
    renderer from Monotype and we don't (and can't) build with UFST support.

  PR:		229211 [1], 229332 [2]
  Tested by:	Osamu Matsuda <omatsuda000@gmail.com>

Changes:
  head/print/ghostscript9-agpl-base/Makefile
  head/print/ghostscript9-agpl-base/files/patch-Resource_Init_cidfmap
  head/print/ghostscript9-agpl-base/files/patch-configure
  head/print/ghostscript9-agpl-base/files/pkg-message.in
  head/print/ghostscript9-agpl-base/pkg-message
  head/print/ghostscript9-agpl-x11/Makefile
Comment 7 Tijl Coosemans freebsd_committer freebsd_triage 2018-06-26 17:22:02 UTC
I believe this has been fixed now, but feel free to reopen if there are additional problems.