summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-07-09 17:49:02 +0000
committerKarl Berry <karl@freefriends.org>2018-07-09 17:49:02 +0000
commit3b1a59a0c249305f7d61917ef6635f5aafdf84bd (patch)
tree9f20633b280d28b3b4ac570389837f0bbc1c0f31 /Build/source/texk
parent3d990936641ada4c678546b3de57c2943d72ac76 (diff)
disable /CharSet output at compile time, since we cannot guarantee correctness
git-svn-id: svn://tug.org/texlive/trunk@48169 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/pdftexdir/writefont.c12
2 files changed, 15 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index 92ddba2e609..cc4d754b614 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,3 +1,7 @@
+2018-07-09 Karl Berry <karl@freefriends.org>
+
+ * writefont.c (write_fontdescriptor) [ENABLE_PDF_CHARSET]:
+
2018-06-13 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* ptexlib.h: Output correct Unicode strings on console
diff --git a/Build/source/texk/web2c/pdftexdir/writefont.c b/Build/source/texk/web2c/pdftexdir/writefont.c
index b96aaf094e0..7e4fbc0223d 100644
--- a/Build/source/texk/web2c/pdftexdir/writefont.c
+++ b/Build/source/texk/web2c/pdftexdir/writefont.c
@@ -484,16 +484,26 @@ static void write_fontdescriptor(fd_entry * fd)
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))
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))