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.
Can you provide a sample document and the ghostscript commands you run on it to show the problem?
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.
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.
I think you should read all patches in version 9.16. For example, in version 9.16, FAPIcidmap was modified.
(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.
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
I believe this has been fixed now, but feel free to reopen if there are additional problems.