Re: [NTG-pdftex] [ pdftex-Bugs-242 ] Assertion failure when including pdf file without embedded fonts
Summary: Assertion failure when including pdf file without embedded fonts
Initial Comment: See included shell script
It looks like the following solves the problem, though I don't know if it may cause other problems: Akira --- mapfile.c.orig Fri Nov 26 21:09:28 2004 +++ mapfile.c Sat Dec 04 16:53:04 2004 @@ -648,7 +648,10 @@ char *ex_ffname; void **aa; - assert(fm->ff_name != NULL); + if(!is_basefont(fm)) + assert(fm->ff_name != NULL); + else + return NULL; tmp.ff_name = fm->ff_name; ff = (ff_entry *) avl_find(ff_tree, &tmp); if (ff == NULL) { /* not yet in database */ @@ -680,8 +683,10 @@ /* check if the font file is available */ ff = check_ff_exist(p); - if (ff->ff_path == NULL) + if(ff) { + if (ff->ff_path == NULL) return false; + } /* check whether this font has been used */ if (fontused[p->tfm_num]) @@ -920,8 +925,10 @@ if (is_truetype(fm) || !is_included(fm)) return dummy_fm_entry(); ff = check_ff_exist(fm); - if (ff->ff_path == NULL) + if(ff) { + if (ff->ff_path == NULL) return dummy_fm_entry(); + } fmx = new_fm_entry(); fmx->flags = fm->flags; fmx->encoding = fm->encoding; --- writet1.c.orig Tue Nov 23 10:36:40 2004 +++ writet1.c Sat Dec 04 16:59:34 2004 @@ -995,7 +995,7 @@ char *ex_ffname = NULL; ff_entry *ff; ff = check_ff_exist(fm_cur); - if (ff->ff_path != NULL) + if (ff && ff->ff_path != NULL) t1_file = xfopen(cur_file_name = ff->ff_path, FOPEN_RBIN_MODE); else { set_cur_file_name(fm_cur->ff_name);
Not yet tried Akira's patch, but there is another problem (ooops they
are piling up):
Formerly one could write "!foo.pfb" in the mapfile and the font file
would not be embedded. So it's also documented. This has silently
changed, now one can just write "foo.pfb" to have it not embedded.
(Writing "
On 2004-12-04 15:38:51 +0100, Hartmut Henkel wrote:
1. i would plea for having the "!" notion in again for backward compatibility, and to have a base for repairing the rest. Never used "!" but there may be people in the "expensive font scene"...
Agreed. Let's try to be backwards-compatible. Best regards Martin -- Martin Schröder, ms@artcom-gmbh.de ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10 http://www.artcom-gmbh.de
Martin Schröder wrote:
On 2004-12-04 15:38:51 +0100, Hartmut Henkel wrote:
1. i would plea for having the "!" notion in again for backward compatibility, and to have a base for repairing the rest. Never used "!" but there may be people in the "expensive font scene"...
Agreed. Let's try to be backwards-compatible.
well, with regards to fonts, the current tex is not backward compatible, so let's clean this up now since advanced users have to fix map/enc stuff anyway I wonder if ! was ever used; how would this combine with +somefont =somefont -somefont entries? or is ! only supported in the mapfile, not in \pdfmapline? Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hartmut Henkel wrote:
Not yet tried Akira's patch, but there is another problem (ooops they are piling up):
Formerly one could write "!foo.pfb" in the mapfile and the font file would not be embedded. So it's also documented. This has silently changed, now one can just write "foo.pfb" to have it not embedded. (Writing "
Now "!foo.pfb" will be treated by the inner pdftex workings as font with name "!foo.pfb" which is not found, obviously. So pdftex munges "!foo.pfb" and "foo.pfb" differently.
hm, i suggest to drop the ! (since we need the first char for +-=) and stick t < and << Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Sun, 5 Dec 2004, h h extern wrote:
Now "!foo.pfb" will be treated by the inner pdftex workings as font with name "!foo.pfb" which is not found, obviously. So pdftex munges "!foo.pfb" and "foo.pfb" differently.
hm, i suggest to drop the ! (since we need the first char for +-=)
the ! has been in for long time, so shouldn't it stay there for backwards compatibility? Virtually nobody knows about the new !-less case as it's documented nowhere, so anybody wanting this no-load feature will use the ! sign. And the +-= go in front of the tfm names, not the fontfile names. So +-= doesn't collide with the ! anyway.
and stick t < and <<
It's in my suggested patch (does the same with and without !) but this can be left out if wanted. Regards, Hartmut
Hartmut Henkel wrote:
the ! has been in for long time, so shouldn't it stay there for backwards compatibility? Virtually nobody knows about the new !-less case as it's documented nowhere, so anybody wanting this no-load feature will use the ! sign.
i only know the < and << way to control it (since that was mentioned on the list); (actually, nobody should want a no-load since it's asking for problems -)
And the +-= go in front of the tfm names, not the fontfile names. So +-= doesn't collide with the ! anyway.
ah, i see, so ! can indeed stay (although +- as prefix for the pfb/ttf file
would make make more sense;
btw, i noticed that
file
participants (5)
-
Akira Kakuto
-
h h extern
-
Hans Hagen
-
Hartmut Henkel
-
Martin Schröder