From 03843b959ed693c5580d2fa39247608b9e6c02f4 Mon Sep 17 00:00:00 2001 From: rishabharya Date: Mon, 10 Aug 2020 03:36:21 +0530 Subject: [PATCH] Resolving texttopdf filter crashing issue due to assert calls --- fontembed/embed_sfnt.c | 4 ++-- fontembed/sfnt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fontembed/embed_sfnt.c b/fontembed/embed_sfnt.c index 3f1f4dc36..b69502b08 100644 --- a/fontembed/embed_sfnt.c +++ b/fontembed/embed_sfnt.c @@ -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; } } diff --git a/fontembed/sfnt.c b/fontembed/sfnt.c index 6fd1fecff..40f1c9892 100644 --- a/fontembed/sfnt.c +++ b/fontembed/sfnt.c @@ -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; } } -- 2.47.2