texlive[49832] Build/source/texk/web2c/pdftexdir: \pdfincludecharset
commits+karl at tug.org
commits+karl at tug.org
Sun Jan 27 18:58:33 CET 2019
Revision: 49832
http://tug.org/svn/texlive?view=revision&revision=49832
Author: karl
Date: 2019-01-27 18:58:33 +0100 (Sun, 27 Jan 2019)
Log Message:
-----------
\pdfincludecharset parameter, pdftex r812
Revision Links:
--------------
http://tug.org/svn/texlive?view=revision&revision=812
Modified Paths:
--------------
trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
trunk/Build/source/texk/web2c/pdftexdir/NEWS
trunk/Build/source/texk/web2c/pdftexdir/pdftex.web
trunk/Build/source/texk/web2c/pdftexdir/writefont.c
Modified: trunk/Build/source/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2019-01-27 10:53:03 UTC (rev 49831)
+++ trunk/Build/source/texk/web2c/pdftexdir/ChangeLog 2019-01-27 17:58:33 UTC (rev 49832)
@@ -1,3 +1,13 @@
+2014-02-14 Karl Berry <karl at gnu.org>
+
+ * pdftex.web (pdf_include_charset_code, pdf_include_charset):
+ new primitive parameter \pdfincludecharset.
+ (print_param): print_esc it.
+ (Put each...): insert in hash table.
+ (get_pdf_include_charset): new fn to get its value.
+ * writefont.c (write_fontdescriptor): check it before outputting
+ CharSet.
+
2019-01-19 Karl Berry <karl at tug.org>
* NEWS,
@@ -495,7 +505,7 @@
* pdftex.web (pdf_suppress_warning_page_group): new primitive
parameter \pdfsuppresswarningpagegroup.
(get_pdf_suppress_warning_page_group): new fn to get its value.
- * pdftopdf.cc (write_epdf): check it before issuing warning.
+ * pdftoepdf.cc (write_epdf): check it before issuing warning.
2014-01-20 Peter Breitenlohner <peb at mppmu.mpg.de>
Modified: trunk/Build/source/texk/web2c/pdftexdir/NEWS
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/NEWS 2019-01-27 10:53:03 UTC (rev 49831)
+++ trunk/Build/source/texk/web2c/pdftexdir/NEWS 2019-01-27 17:58:33 UTC (rev 49832)
@@ -1,8 +1,10 @@
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019)
- changes:
- new primitive \expanded (from unreleased pdftex 1.50 branch + luatex).
- - the /CharSet string is now always omitted from the PDF output, since
- it cannot feasibly be guaranteed correct, but the standard requires this.
+ - new primitive parameter \pdfincludecharset; zero by default to omit
+ the /CharSet string from the PDF output, since it cannot feasibly be
+ guaranteed correct as the PDF/A-2 and /A-3 standards require; setting
+ to 1 includes it again, as required by PDF/A-1.
pdfTeX 3.14159265-2.6-1.40.19 (TeX Live 2018) (April 14, 2018)
- changes:
@@ -10,7 +12,7 @@
(pdftex r782).
- allow encoding vectors for bitmap PK fonts (r790).
- when a non-PDF special is ignored, output a (leading substring of the)
- special, preceded by "<special> ".
+ special, preceded by "<special> ".
- bugfixes:
- \pdfprimitive does nothing, rather than give an error, when given a
Modified: trunk/Build/source/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/pdftex.web 2019-01-27 10:53:03 UTC (rev 49831)
+++ trunk/Build/source/texk/web2c/pdftexdir/pdftex.web 2019-01-27 17:58:33 UTC (rev 49832)
@@ -5692,7 +5692,8 @@
@d pdf_suppress_warning_page_group_code = pdftex_first_integer_code + 29 {suppress warning about multiple pdfs with page group}
@d pdf_info_omit_date_code = pdftex_first_integer_code + 30 {omit generating CreationDate and ModDate}
@d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 31 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_int_pars=pdftex_first_integer_code + 32 {total number of \pdfTeX's integer parameters}
+ at d pdf_include_charset_code = pdftex_first_integer_code + 32 {suppress /PTEX.* entries in PDF dictionaries}
+ at d pdf_int_pars=pdftex_first_integer_code + 33 {total number of \pdfTeX's integer parameters}
@#
@d etex_int_base=pdf_int_pars {base for \eTeX's integer parameters}
@d tracing_assigns_code=etex_int_base {show assignments}
@@ -5803,6 +5804,7 @@
@d pdf_suppress_warning_page_group == int_par(pdf_suppress_warning_page_group_code)
@d pdf_info_omit_date == int_par(pdf_info_omit_date_code)
@d pdf_suppress_ptex_info == int_par(pdf_suppress_ptex_info_code)
+ at d pdf_include_charset == int_par(pdf_include_charset_code)
@#
@d tracing_assigns==int_par(tracing_assigns_code)
@d tracing_groups==int_par(tracing_groups_code)
@@ -5910,6 +5912,7 @@
pdf_suppress_warning_page_group_code:print_esc("pdfsuppresswarningpagegroup");
pdf_info_omit_date_code:print_esc("pdfinfoomitdate");
pdf_suppress_ptex_info_code: print_esc("pdfsuppressptexinfo");
+pdf_include_charset_code: print_esc("pdfincludecharset");
@/@<Cases for |print_param|@>@/
othercases print("[unknown integer parameter!]")
endcases;
@@ -6096,11 +6099,16 @@
primitive("pdfsuppresswarningpagegroup",assign_int,int_base+pdf_suppress_warning_page_group_code);@/
@!@:pdf_suppress_warning_page_group_}{\.{\\pdfsuppresswarningpagegroup} primitive@>
+
primitive("pdfinfoomitdate",assign_int,int_base+pdf_info_omit_date_code);@/
@!@:pdf_info_omit_date_}{\.{\\pdfinfoomitdate} primitive@>
+
primitive("pdfsuppressptexinfo",assign_int,int_base+pdf_suppress_ptex_info_code);@/
@!@:pdf_suppress_ptex_info_}{\.{\\pdfsuppressptexinfo} primitive@>
+primitive("pdfincludecharset",assign_int,int_base+pdf_include_charset_code);@/
+@!@:pdf_include_charset}{\.{\\pdfincludecharset} primitive@>
+
@ @<Cases of |print_cmd_chr|...@>=
assign_int: if chr_code<count_base then print_param(chr_code-int_base)
else begin print_esc("count"); print_int(chr_code-count_base);
@@ -15104,6 +15112,11 @@
get_pdf_suppress_ptex_info := pdf_suppress_ptex_info;
end;
+function get_pdf_include_charset: integer;
+begin
+ get_pdf_include_charset := pdf_include_charset;
+end;
+
function get_nullfont: internal_font_number;
begin
get_nullfont := null_font;
Modified: trunk/Build/source/texk/web2c/pdftexdir/writefont.c
===================================================================
--- trunk/Build/source/texk/web2c/pdftexdir/writefont.c 2019-01-27 10:53:03 UTC (rev 49831)
+++ trunk/Build/source/texk/web2c/pdftexdir/writefont.c 2019-01-27 17:58:33 UTC (rev 49832)
@@ -484,16 +484,22 @@
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, 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.):
+ if (getpdfincludecharset() > 0 && is_subsetted(fd->fm) && is_type1(fd->fm)) {
+ /* We don't get CharSet right. For some PDF standards,
+ CharSet is optional, but if it appears, it must be
+ correct. Unfortunately, there seems to be 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. */
+
+ But for PDF/A-1, apparently it is required, regardless:
+ https://mailman.ntg.nl/pipermail/ntg-pdftex/2019-January/004264.html
+
+ Whereas for PDF/A-2 and PDF/A-3, it can be omitted:
+ https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-62114-3
+
+ Therefore, whether it is output can be controlled by the
+ user at runtime via \pdfincludecharset. */
assert(fd->gl_tree != NULL);
avl_t_init(&t, fd->gl_tree);
/* Names may appear in any order. */
@@ -503,7 +509,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