[NTG-pdftex] [ pdftex-Bugs-242 ] Assertion failure when including pdf file without embedded fonts

Akira Kakuto kakuto at fsci.fuk.kindai.ac.jp
Sat Dec 4 09:12:37 CET 2004


> 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);


More information about the ntg-pdftex mailing list