]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Resolving texttopdf filter crashing issue due to assert calls 276/head
authorrishabharya <rishabharya2799@gmail.com>
Sun, 9 Aug 2020 22:06:21 +0000 (03:36 +0530)
committerrishabharya <rishabharya2799@gmail.com>
Sun, 9 Aug 2020 22:06:21 +0000 (03:36 +0530)
fontembed/embed_sfnt.c
fontembed/sfnt.c

index 3f1f4dc3686685ae5622b1ead5e6705908804876..b69502b08205f259f101de4a36a2417f24d37b98 100644 (file)
@@ -254,7 +254,7 @@ EMB_PDF_FONTWIDTHS *emb_otf_get_pdf_widths(OTF_FILE *otf,const unsigned short *e
   // ensure hmtx is there
   if (!otf->hmtx) {
     if (otf_load_more(otf)!=0) {
-      assert(0);
+      fprintf(stderr,"Unsupported OTF font / cmap table \n");
       return NULL;
     }
   }
@@ -299,7 +299,7 @@ EMB_PDF_FONTWIDTHS *emb_otf_get_pdf_cidwidths(OTF_FILE *otf,const BITSET glyphs)
   // ensure hmtx is there
   if (!otf->hmtx) {
     if (otf_load_more(otf)!=0) {
-      assert(0);
+      fprintf(stderr,"Unsupported OTF font / cmap table \n");
       return NULL;
     }
   }
index 6fd1fecffa581cfbcc43e740811a123b70cd39f0..40f1c9892fe73747e30374a92ecdc3a821173bc0 100644 (file)
@@ -648,7 +648,7 @@ int otf_get_width(OTF_FILE *otf,unsigned short gid) // {{{  -1 on error
   // ensure hmtx is there
   if (!otf->hmtx) {
     if (otf_load_more(otf)!=0) {
-      assert(0);
+      fprintf(stderr,"Unsupported OTF font / cmap table \n");
       return -1;
     }
   }