diff options
Diffstat (limited to 'source/pdf/pdf-font.c')
-rw-r--r-- | source/pdf/pdf-font.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/pdf/pdf-font.c b/source/pdf/pdf-font.c index 7caf9e3a..ebefde78 100644 --- a/source/pdf/pdf-font.c +++ b/source/pdf/pdf-font.c @@ -1667,8 +1667,7 @@ pdf_add_simple_font_widths(fz_context *ctx, pdf_document *doc, pdf_obj *fobj, fz static void pdf_add_cid_system_info(fz_context *ctx, pdf_document *doc, pdf_obj *fobj, const char *reg, const char *ord, int supp) { - pdf_obj *csi; - pdf_dict_put_drop(ctx, fobj, PDF_NAME_CIDSystemInfo, csi = pdf_new_dict(ctx, doc, 3)); + pdf_obj *csi = pdf_dict_put_dict(ctx, fobj, PDF_NAME_CIDSystemInfo, 3); pdf_dict_put_string(ctx, csi, PDF_NAME_Registry, reg, strlen(reg)); pdf_dict_put_string(ctx, csi, PDF_NAME_Ordering, ord, strlen(ord)); pdf_dict_put_int(ctx, csi, PDF_NAME_Supplement, supp); @@ -2035,7 +2034,7 @@ pdf_add_cid_font(fz_context *ctx, pdf_document *doc, fz_font *font) pdf_dict_put(ctx, fobj, PDF_NAME_Encoding, PDF_NAME_Identity_H); pdf_add_to_unicode(ctx, doc, fobj, font); - pdf_dict_put_drop(ctx, fobj, PDF_NAME_DescendantFonts, dfonts = pdf_new_array(ctx, doc, 1)); + dfonts = pdf_dict_put_array(ctx, fobj, PDF_NAME_DescendantFonts, 1); pdf_array_push_drop(ctx, dfonts, pdf_add_descendant_cid_font(ctx, doc, font)); fref = pdf_insert_font_resource(ctx, doc, digest, fobj); @@ -2055,9 +2054,9 @@ pdf_add_simple_font_encoding_imp(fz_context *ctx, pdf_document *doc, pdf_obj *fo pdf_obj *enc, *diff; int i, last; - pdf_dict_put_drop(ctx, font, PDF_NAME_Encoding, enc = pdf_new_dict(ctx, doc, 3)); + enc = pdf_dict_put_dict(ctx, font, PDF_NAME_Encoding, 2); pdf_dict_put(ctx, enc, PDF_NAME_BaseEncoding, PDF_NAME_WinAnsiEncoding); - pdf_dict_put_drop(ctx, enc, PDF_NAME_Differences, diff = pdf_new_array(ctx, doc, 129)); + diff = pdf_dict_put_array(ctx, enc, PDF_NAME_Differences, 129); last = 0; for (i = 128; i < 256; ++i) { @@ -2217,7 +2216,7 @@ pdf_add_cjk_font(fz_context *ctx, pdf_document *doc, fz_font *fzfont, int script pdf_dict_put(ctx, font, PDF_NAME_Subtype, PDF_NAME_Type0); pdf_dict_put_name(ctx, font, PDF_NAME_BaseFont, basefont); pdf_dict_put_name(ctx, font, PDF_NAME_Encoding, encoding); - pdf_dict_put_drop(ctx, font, PDF_NAME_DescendantFonts, dfonts = pdf_new_array(ctx, doc, 1)); + dfonts = pdf_dict_put_array(ctx, font, PDF_NAME_DescendantFonts, 1); pdf_array_push_drop(ctx, dfonts, pdf_add_object_drop(ctx, doc, subfont = pdf_new_dict(ctx, doc, 5))); { pdf_dict_put(ctx, subfont, PDF_NAME_Type, PDF_NAME_Font); |