summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-07-20 13:18:43 +0200
committerTor Andersson <tor.andersson@artifex.com>2012-07-20 16:38:27 +0200
commitf8aa12ebc18d84bd6b18bf266f128cf6738ca812 (patch)
tree285ce965703e1388cccb17696b4bb6ef0de7d7ad
parent71340325936893d7ea993bf0ff78e5ab5b695fd0 (diff)
downloadmupdf-f8aa12ebc18d84bd6b18bf266f128cf6738ca812.tar.xz
Attempt to load CID fonts with invalid cid collections.
Warn instead of throwing an error. Fixes file in http://code.google.com/p/sumatrapdf/issues/detail?id=1842
-rw-r--r--pdf/pdf_font.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pdf/pdf_font.c b/pdf/pdf_font.c
index dad20828..ee4863f1 100644
--- a/pdf/pdf_font.c
+++ b/pdf/pdf_font.c
@@ -260,12 +260,15 @@ pdf_load_system_font(fz_context *ctx, pdf_font_desc *fontdesc, char *fontname, c
else if (!strcmp(collection, "Adobe-Korea1"))
pdf_load_substitute_cjk_font(ctx, fontdesc, PDF_ROS_KOREA, serif);
else
- fz_throw(ctx, "unknown cid collection: %s", collection);
- return;
+ {
+ fz_warn(ctx, "unknown cid collection: %s", collection);
+ pdf_load_substitute_font(ctx, fontdesc, mono, serif, bold, italic);
+ }
+ }
+ else
+ {
+ pdf_load_substitute_font(ctx, fontdesc, mono, serif, bold, italic);
}
-
- pdf_load_substitute_font(ctx, fontdesc, mono, serif, bold, italic);
- /* RJW: "cannot load substitute font" */
}
static void