Package: mpage
Version: 2.5.4-2
Severity: important
Tags: patch
mpage always emits the following code in its prolog. Reproducible with:
$ mpage </dev/null
===============
/unijis /Ryumin-Light-UniJIS-UTF8-H findfont 11 scalefont def
/uniks /Baekmuk-Batang-UniKS-UTF8-H findfont 11 scalefont def
/unigb /BousungEG-Light-GB-UniGB-UTF8-H findfont 11 scalefont def
/unicns /ShanHeiSun-Light-UniCNS-UTF8-H findfont 11 scalefont def
===============
Ghostscript (gss-gpl 8.15-4.1) fails to find this resource with the
following error (plus similar ones). gv also fails. Reproducible with:
$ mpage </dev/null | gs
===============
GS>Error: /undefinedresource in --findresource--
Operand stack:
unigb BousungEG-Light-GB-UniGB-UTF8-H Font
BousungEG-Light-GB-UniGB-UTF8-H (BousungEG-Light-GB-UniGB-UTF8-H) 18
BousungEG-Light-GB UniGB-UTF8-H UniGB-UTF8-H BousungEG-Light-GB
--nostringval-- Registry (Adobe) Ordering (GB1) --nostringval--
CMap (GB1) CMap (GB1)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
%loop_continue 2 3 %oparray_pop --nostringval-- --nostringval--
false 1 %stopped_push .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- 2 3 %oparray_pop
3 3 %oparray_pop --nostringval-- --nostringval-- 16 6
%oparray_pop --nostringval-- 19 7 %oparray_pop --nostringval--
--nostringval--
Dictionary stack:
--dict:1115/1686(ro)(G)-- --dict:0/20(G)-- --dict:82/200(L)--
--dict:17/17(ro)(G)-- --dict:20/26(ro)(G)-- --dict:5/8(G)--
--dict:0/10(L)-- --dict:19/26(ro)(G)--
Current allocation mode is local
Last OS error: 2
Current file position is 49
===============
The code emitted by mpage should not require these fonts to be present.
This should be fixed by changing the font definition into a procedure,
which defers the evaluation (and font search) until it is actually used.
Like so, for all the similar instances in mpage:
< fprintf(outfd, "/uniks /Baekmuk-Batang-UniKS-UTF8-H findfont %d scalefont
def\n", fsize - 1);
> fprintf(outfd, "/uniks { /Baekmuk-Batang-UniKS-UTF8-H findfont %d
> scalefont } def\n", fsize - 1);
I'll attach a patch to do them.
Cheers,
- Simon
-- System Information:
Debian Release: testing/unstable
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12.4-general
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages mpage depends on:
hi libc6 2.3.5-8 GNU C Library: Shared libraries an
hi libpaper1 1.1.14-5 Library for handling paper charact
mpage recommends no packages.
-- debconf-show failed
*** mpage-fix-fontdefs.patch
--- mpage.c.orig 2006-03-02 18:03:43.000000000 +1100
+++ mpage.c 2006-03-02 18:12:06.000000000 +1100
@@ -328,21 +328,21 @@
fprintf(outfd, "(a) stringwidth pop /mp_a_x exch def\n");
#ifdef KANJI
#ifdef GOTHIC
- fprintf(outfd, "/kanj /GothicBBB-Medium-H findfont %d scalefont def\n",
fsize - 1);
- fprintf(outfd, "/han /GothicBBB-Medium.Hankaku findfont %d scalefont
def\n", fsize - 1);
+ fprintf(outfd, "/kanj { /GothicBBB-Medium-H findfont %d scalefont }
def\n", fsize - 1);
+ fprintf(outfd, "/han { /GothicBBB-Medium.Hankaku findfont %d scalefont }
def\n", fsize - 1);
#else
- fprintf(outfd, "/kanj /Ryumin-Light-H findfont %d scalefont def\n", fsize
- 1);
- fprintf(outfd, "/han /Ryumin-Light.Hankaku findfont %d scalefont def\n",
fsize - 1);
+ fprintf(outfd, "/kanj { /Ryumin-Light-H findfont %d scalefont } def\n",
fsize - 1);
+ fprintf(outfd, "/han { /Ryumin-Light.Hankaku findfont %d scalefont }
def\n", fsize - 1);
#endif
#endif
#ifdef GOTHIC
- fprintf(outfd, "/unijis /GothicBBB-Medium-UniJIS-UTF8-H findfont %d
scalefont def\n", fsize - 1);
+ fprintf(outfd, "/unijis { /GothicBBB-Medium-UniJIS-UTF8-H findfont %d
scalefont } def\n", fsize - 1);
#else
- fprintf(outfd, "/unijis /Ryumin-Light-UniJIS-UTF8-H findfont %d scalefont
def\n", fsize - 1);
+ fprintf(outfd, "/unijis { /Ryumin-Light-UniJIS-UTF8-H findfont %d
scalefont } def\n", fsize - 1);
#endif
- fprintf(outfd, "/uniks /Baekmuk-Batang-UniKS-UTF8-H findfont %d scalefont
def\n", fsize - 1);
- fprintf(outfd, "/unigb /BousungEG-Light-GB-UniGB-UTF8-H findfont %d
scalefont def\n", fsize - 1);
- fprintf(outfd, "/unicns /ShanHeiSun-Light-UniCNS-UTF8-H findfont %d
scalefont def\n", fsize - 1);
+ fprintf(outfd, "/uniks { /Baekmuk-Batang-UniKS-UTF8-H findfont %d
scalefont } def\n", fsize - 1);
+ fprintf(outfd, "/unigb { /BousungEG-Light-GB-UniGB-UTF8-H findfont %d
scalefont } def\n", fsize - 1);
+ fprintf(outfd, "/unicns { /ShanHeiSun-Light-UniCNS-UTF8-H findfont %d
scalefont } def\n", fsize - 1);
# ifdef DEBUG
if (Debug_flag & DB_PSMPAGE)
fprintf(outfd, "(\\t'a' length ) print mp_a_x ==\nflush\n");
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]