diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-18 08:21:26 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-08-18 08:21:26 +0000 |
commit | 23a53e34ec5000b9501fd58c7c0fa777faf73e8f (patch) | |
tree | b7077ab55f0ddd1ad9a3158a62bfaacd1245e6f1 /Build/source/texk/dvipdfm-x | |
parent | 868cd3787815dd2b645289cf6cf381e0238d8247 (diff) |
All glyphs including component glyphs and dummy glyphs except for .notdef are now listed in CIDSet (S. Hirata).
git-svn-id: svn://tug.org/texlive/trunk@48427 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/cidtype2.c | 36 |
2 files changed, 27 insertions, 15 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index bed3e492eb4..dc4009a4652 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,9 @@ +2018-08-18 Shunsaku Hirata <shunsaku.hirata74@gmail.com> + + * cidtype2.c: Workaround for CIDSet issue. All glyphs + including component glyphs and dummy glyphs except .notdef + should be listed in CIDSet. + 2018-08-17 Shunsaku Hirata <shunsaku.hirata74@gmail.com> * cmap_write.c, tt_cmap.[ch], type0.c: Fixed a bug that diff --git a/Build/source/texk/dvipdfm-x/cidtype2.c b/Build/source/texk/dvipdfm-x/cidtype2.c index 63f7e045be0..0c53848ddd7 100644 --- a/Build/source/texk/dvipdfm-x/cidtype2.c +++ b/Build/source/texk/dvipdfm-x/cidtype2.c @@ -1,6 +1,6 @@ /* This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks. - Copyright (C) 2002-2016 by Jin-Hwan Cho and Shunsaku Hirata, + Copyright (C) 2002-2018 by Jin-Hwan Cho and Shunsaku Hirata, the dvipdfmx project team. This program is free software; you can redistribute it and/or modify @@ -856,6 +856,26 @@ CIDFont_type2_dofont (CIDFont *font) add_TTCIDVMetrics(font->fontdict, glyphs, used_chars, last_cid); } + /* CIDSet + * NOTE: All glyphs including component glyph and dummy glyph must be + * listed in CIDSet. However, .notdef glyph should be ommitted. + */ + { + pdf_obj *cidset; + char *cidset_data; + + cidset_data = NEW(glyphs->last_gid/8 + 1, char); + memset(cidset_data, 0, glyphs->last_gid/8 + 1); + for (i = 1; i <= glyphs->last_gid; i++) + cidset_data[i/8] |= (1 << (7 - i % 8)); + cidset = pdf_new_stream(STREAM_COMPRESS); + pdf_add_stream(cidset, cidset_data, glyphs->last_gid/8 + 1); + RELEASE(cidset_data); + pdf_add_dict(font->descriptor, + pdf_new_name("CIDSet"), pdf_ref_obj(cidset)); + pdf_release_obj(cidset); + } + tt_build_finish(glyphs); /* Finish here if not embedded. */ @@ -900,20 +920,6 @@ CIDFont_type2_dofont (CIDFont *font) pdf_release_obj(fontfile); /* - * CIDSet - */ - { - pdf_obj *cidset; - - cidset = pdf_new_stream(STREAM_COMPRESS); - pdf_add_stream(cidset, used_chars, last_cid/8 + 1); - pdf_add_dict(font->descriptor, - pdf_new_name("CIDSet"), - pdf_ref_obj(cidset)); - pdf_release_obj(cidset); - } - - /* * CIDToGIDMap * Adobe's PDF Reference had been describing it as "optional" and * default value as "Identity". However, ISO 32000-1 requires it |