NetBSD Problem Report #46133
From makoto@t-105.i.ki.nu Sat Mar 3 03:42:27 2012
Return-Path: <makoto@t-105.i.ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id D88CD63BFFC
for <gnats-bugs@gnats.NetBSD.org>; Sat, 3 Mar 2012 03:42:26 +0000 (UTC)
Message-Id: <201203030342.q233gSSq027569@t-105.i.ki.nu>
Date: Sat, 3 Mar 2012 12:42:28 +0900 (JST)
From: makoto@ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.NetBSD.org
Subject: [PATCH] print/pdvipsk fails to find rml font
X-Send-Pr-Version: 3.95
>Number: 46133
>Category: pkg
>Synopsis: pdvips fails to find mapping for rml fonts
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: minskim
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 03 03:45:00 +0000 2012
>Closed-Date: Wed Mar 07 16:15:02 +0000 2012
>Last-Modified: Wed Mar 07 16:15:02 +0000 2012
>Originator: KINU Corporation
>Release: NetBSD 5.1
>Organization:
Makoto Fujiwara
>Environment:
System: NetBSD t-105.i.ki.nu 5.1 NetBSD 5.1 (GENERIC) #0: Sat Nov 6 13:19:33 UTC 2010 builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-RELEASE/amd64/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
To process Japanese *.dvi file generated from pLaTeX, pdvips fails with
the message
mktexpk: don't know how to create bitmap font for rml.
mktexpk: perhaps rml is missing from the map file.
...
pdvips: ! invalid char 19032 from font rml
This is because missing fontmap translation between
the font name used in *.dvi and fontname used in Japanese Postscript file.
>How-To-Repeat:
Prepare Japanese hoge.tex file. platex hoge.tex; and pdvips hoge.dvi
Related packages so far are probably following.
ptexenc-1.1.1 Library for Japanese pTeX and its tools
tex-ptex-3.1.9nb1 TeX system for publishing in Japanese
ja-ptex-share-2.5 Library files for pTeX
ja-ptex-2.0 Meta-package for pTeX et al, supports Japanese language
>Fix:
To resolve this problem, add one kanji.map to convert 'rml' to
well known name Ryumin-Light-H etc. And also pdvips to refer
config.ps file which includes reference to this newly added
kanji.map file, to summarize
pdvips -> config-j.ps -> kanji.map (rml -> Ryumin-Light-H etc).
The patch is following, As a side information, there
is a shell script named jisftconfig, which does the
similar thing in Linux world. I would say this is the
well-known problem for processing dvi files including
Kanji. Thanks,
Index: print/pdvipsk/Makefile
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/print/pdvipsk/Makefile,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 Makefile
--- print/pdvipsk/Makefile 7 Feb 2011 19:43:28 -0000 1.1.1.1
+++ print/pdvipsk/Makefile 3 Mar 2012 02:00:18 -0000
@@ -28,7 +28,18 @@
--with-kpathsea-includes=${BUILDLINK_PREFIX.kpathsea}/include \
--with-kpathsea-libdir=${BUILDLINK_PREFIX.kpathsea}/lib
+SUBST_CLASSES+= fix-config.ps
+SUBST_STAGE.fix-config.ps= pre-configure
+SUBST_FILES.fix-config.ps= texk/tetex/texconfig
+SUBST_SED.fix-config.ps= -e 's|config.ps|config-j.ps'
+
+TEXCONFIG_DIR= share/tetex/tetex/texconfig
+TEXDVIPS_UPDMAP_DIR= etc/texmf/dvips/config
INSTALLATION_DIRS+= bin
+# Tweak to look modified version of config.ps
+INSTALLATION_DIRS+= ${TEXCONFIG_DIR}
+INSTALLATION_DIRS+= ${TEXDVIPS_UPDMAP_DIR}
+
.include "../../print/kpathsea/buildlink3.mk"
@@ -37,6 +48,12 @@
< ${WRKDIR}/dvipsk-5.98-p1.7b-tl2009.diff
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/pdvips ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/pdvips ${DESTDIR}${PREFIX}/bin
+ # install mapfile
+ ${INSTALL_DATA} files/kanji.map \
+ ${DESTDIR}${PREFIX}/${TEXDVIPS_UPDMAP_DIR}
+ # install modified version of config map for pdvips only, see above SUBST lines
+ ${INSTALL_DATA} ${WRKSRC}/config.ps \
+ ${DESTDIR}${PREFIX}/${TEXCONFIG_DIR}/config-j.ps
.include "../../mk/bsd.pkg.mk"
Index: print/pdvipsk/PLIST
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/print/pdvipsk/PLIST,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 PLIST
--- print/pdvipsk/PLIST 7 Feb 2011 19:43:28 -0000 1.1.1.1
+++ print/pdvipsk/PLIST 3 Mar 2012 02:18:42 -0000
@@ -1,2 +1,4 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2011/02/07 19:43:28 minskim Exp $
bin/pdvips
+etc/texmf/dvips/config/kanji.map
+share/tetex/tetex/texconfig/config-j.ps
Index: print/pdvipsk/distinfo
===================================================================
RCS file: /e/cvsync/cvsync/pkgsrc/print/pdvipsk/distinfo,v
retrieving revision 1.1.1.1
diff -u -u -r1.1.1.1 distinfo
--- print/pdvipsk/distinfo 7 Feb 2011 19:43:28 -0000 1.1.1.1
+++ print/pdvipsk/distinfo 3 Mar 2012 01:47:49 -0000
@@ -7,3 +7,4 @@
RMD160 (texlive-20091011-source.tar.xz) = 81b86cd93e629d6b1b3d7918848dd76babc0d5a9
Size (texlive-20091011-source.tar.xz) = 29683728 bytes
SHA1 (patch-aa) = 825b091fecb17e8cc9135a0341b90e49ffd56baf
+SHA1 (patch-texk_dvips_config.ps) = e90fea438e6ab63030d786c930040b67aa661549
Index: print/pdvipsk/files/kanji.map
===================================================================
RCS file: print/pdvipsk/files/kanji.map
diff -N print/pdvipsk/files/kanji.map
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ print/pdvipsk/files/kanji.map 3 Mar 2012 01:27:56 -0000
@@ -0,0 +1,16 @@
+rml Ryumin-Light-H
+rmlv Ryumin-Light-V
+gbm GothicBBB-Medium-H
+gbmv GothicBBB-Medium-V
+ryumin-l Ryumin-Light-H
+ryumin-l-v Ryumin-Light-V
+gtbbb-m GothicBBB-Medium-H
+gtbbb-m-v GothicBBB-Medium-V
+futomin-b FutoMinA101-Bold-H
+futomin-b-v FutoMinA101-Bold-V
+futogo-b FutoGoB101-Bold-H
+futogo-b-v FutoGoB101-Bold-V
+jun101-l Jun101-Light-H
+jun101-l-v Jun101-Light-V
+unimin Ryumin-Light-UniJIS-UCS2-H
+unigoth GothicBBB-Medium-UniJIS-UCS2-H
Index: print/pdvipsk/patches/patch-texk_dvips_config.ps
===================================================================
RCS file: print/pdvipsk/patches/patch-texk_dvips_config.ps
diff -N print/pdvipsk/patches/patch-texk_dvips_config.ps
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ print/pdvipsk/patches/patch-texk_dvips_config.ps 3 Mar 2012 01:47:36 -0000
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add kanji.map as modified version of config.ps
+(This config.ps will be installed as config-j.ps)
+
+--- texk/dvipsk/config.ps.orig 2009-09-27 03:30:44.000000000 +0900
++++ config.ps 2012-03-03 10:44:16.000000000 +0900
+@@ -51,6 +51,7 @@
+ % This shows how to add your own map file.
+ % Remove the comment and adjust the name:
+ % p +myfonts.map
++p +kanji.map
+
+ % In the past, the a4size and letterSize definitions did not set the
+ % paper size, but we want to set it if we can so that ps2pdf can work
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->minskim
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sat, 03 Mar 2012 10:07:25 +0000
Responsible-Changed-Why:
Over to tex maintainer.
From: Min Sik Kim <minskim@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/46133: [PATCH] print/pdvipsk fails to find rml font
Date: Sat, 03 Mar 2012 18:11:59 -0800
At Sat, 3 Mar 2012 03:45:00 +0000 (UTC),
makoto@ki.nu wrote:
>
> To process Japanese *.dvi file generated from pLaTeX, pdvips fails with
> the message
>
> mktexpk: don't know how to create bitmap font for rml.
> mktexpk: perhaps rml is missing from the map file.
> ...
> pdvips: ! invalid char 19032 from font rml
>
> This is because missing fontmap translation between the font
> name used in *.dvi and fontname used in Japanese Postscript
> file.
Could you test with tex-ptex-3.2? It installs the font map for rml.
BTW, do we still need print/pdvipsk? What print/pdvipsk can do that
print/dvipsk cannot?
--
Min Sik Kim
State-Changed-From-To: open->feedback
State-Changed-By: minskim@NetBSD.org
State-Changed-When: Sun, 04 Mar 2012 16:20:27 +0000
State-Changed-Why:
Updated related packages. Waiting for confirmation.
From: Makoto Fujiwara <makoto@ki.nu>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/46133: [PATCH] print/pdvipsk fails to find rml font
Date: Wed, 07 Mar 2012 10:25:48 +0900
Thanks minskim@, and sorry for late responce,
The combination of tex-ptex-3.2 and pdvips-5.89 seems OK
dvi gen dvi to ps dvi viewer
-------- --------- ----------
tex-ptex pdvips xdvi
3.19 5.89 needs patch (PR/46133)
3.2 5.89 OK rml missing(*1)
(*1) example
xdvi-xaw: Warning: Character 19032 not defined in font rml
xdvi-xaw: Warning: Character 19832 not defined in font rml
I think the PR to be closed, as far as Newly generated dvi
(by te-ptex 3.2) including Japanese Kanji can be processed
properly at least for generating *.ps file.
---
Makoto Fujiwara,
Chiba, Japan, Narita Airport and Disneyland prefecture.
State-Changed-From-To: feedback->closed
State-Changed-By: minskim@NetBSD.org
State-Changed-When: Wed, 07 Mar 2012 16:15:02 +0000
State-Changed-Why:
Fix confirmed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.