texlive[48169] Build/source/texk/web2c/pdftexdir: disable /CharSet
commits+karl at tug.org
commits+karl at tug.org
Mon Jul 9 19:49:02 CEST 2018
Revision: 48169
http://tug.org/svn/texlive?view=revision&revision=48169
Author: karl
Date: 2018-07-09 19:49:02 +0200 (Mon, 09 Jul 2018)
Log Message:
-----------
disable /CharSet output at compile time, since we cannot guarantee correctness
Modified Paths:
--------------
trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
trunk/Build/source/texk/web2c/pdftexdir/writefont.c
Modified: trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2018-07-09 17:00:10 UTC (rev 48168)
+++ trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2018-07-09 17:49:02 UTC (rev 48169)
@@ -1,3 +1,7 @@
+2018-07-09 Karl Berry <karl at freefriends.org>
+
+ * writefont.c (write_fontdescriptor) [ENABLE_PDF_CHARSET]:
+
2018-06-13 TANAKA Takuji <ttk at t-lab.opal.ne.jp>
* ptexlib.h: Output correct Unicode strings on console
Modified: trunk/Build/source/texk/web2c/pdftexdir/writefont.c
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/writefont.c 2018-07-09 17:00:10 UTC (rev 48168)
+++ trunk/Build/source/texk/web2c/pdftexdir/writefont.c 2018-07-09 17:49:02 UTC (rev 48169)
@@ -484,10 +484,19 @@
pdf_printf("/Flags %i\n", fd_flags);
write_fontmetrics(fd);
if (fd->ff_found) {
+#ifdef ENABLE_PDF_CHARSET /* just in case a builder wants it */
if (is_subsetted(fd->fm) && is_type1(fd->fm)) {
- /* /CharSet is optional; names may appear in any order */
+ /* CharSet is optional, but if it appears, it must be
+ correct. Unfortunately, there is no practical way we can
+ guarantee correctness with precomposed accent characters
+ in our usual fonts (EC, TX, etc.):
+ https://mailman.ntg.nl/pipermail/ntg-pdftex/2018-June/004251.html
+ Therefore, we disable its output. The code is left in
+ just in case it turns out that something important was
+ relying on the (incorrect) CharSet. */
assert(fd->gl_tree != NULL);
avl_t_init(&t, fd->gl_tree);
+ /* Names may appear in any order. */
pdf_puts("/CharSet (");
for (glyph = (char *) avl_t_first(&t, fd->gl_tree); glyph != NULL;
glyph = (char *) avl_t_next(&t))
@@ -494,6 +503,7 @@
pdf_printf("/%s", glyph);
pdf_puts(")\n");
}
+#endif /* ENABLE_PDF_CHARSET */
if (is_type1(fd->fm))
pdf_printf("/FontFile %i 0 R\n", (int) fd->ff_objnum);
else if (is_truetype(fd->fm))
More information about the tex-live-commits
mailing list