texlive[48427] Build/source/texk/dvipdfm-x: All glyphs including
commits+kakuto at tug.org
commits+kakuto at tug.org
Sat Aug 18 10:21:26 CEST 2018
Revision: 48427
http://tug.org/svn/texlive?view=revision&revision=48427
Author: kakuto
Date: 2018-08-18 10:21:26 +0200 (Sat, 18 Aug 2018)
Log Message:
-----------
All glyphs including component glyphs and dummy glyphs except for .notdef are now listed in CIDSet (S. Hirata).
Modified Paths:
--------------
trunk/Build/source/texk/dvipdfm-x/ChangeLog
trunk/Build/source/texk/dvipdfm-x/cidtype2.c
Modified: trunk/Build/source/texk/dvipdfm-x/ChangeLog
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/ChangeLog 2018-08-18 00:23:43 UTC (rev 48426)
+++ trunk/Build/source/texk/dvipdfm-x/ChangeLog 2018-08-18 08:21:26 UTC (rev 48427)
@@ -1,3 +1,9 @@
+2018-08-18 Shunsaku Hirata <shunsaku.hirata74 at 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 at gmail.com>
* cmap_write.c, tt_cmap.[ch], type0.c: Fixed a bug that
Modified: trunk/Build/source/texk/dvipdfm-x/cidtype2.c
===================================================================
--- trunk/Build/source/texk/dvipdfm-x/cidtype2.c 2018-08-18 00:23:43 UTC (rev 48426)
+++ trunk/Build/source/texk/dvipdfm-x/cidtype2.c 2018-08-18 08:21:26 UTC (rev 48427)
@@ -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 @@
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 @@
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
More information about the tex-live-commits
mailing list