diff options
author | Karl Berry <karl@freefriends.org> | 2019-01-27 17:58:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-01-27 17:58:33 +0000 |
commit | 26018324f721b0c1e8dabef2253c941a26574f6a (patch) | |
tree | 29270564a6b7581bfb8e1c7039696eef97b9ccc8 /Build/source/texk | |
parent | b9c0301ba579a3f12913ac93eca8019e21d7cdb9 (diff) |
\pdfincludecharset parameter, pdftex r812
git-svn-id: svn://tug.org/texlive/trunk@49832 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 12 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/NEWS | 8 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/pdftex.web | 15 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/writefont.c | 26 |
4 files changed, 46 insertions, 15 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index d9bfbfc1421..57776405150 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,13 @@ +2014-02-14 Karl Berry <karl@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@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@mppmu.mpg.de> diff --git a/Build/source/texk/web2c/pdftexdir/NEWS b/Build/source/texk/web2c/pdftexdir/NEWS index 2fbca6702e0..b62e6eea66c 100644 --- a/Build/source/texk/web2c/pdftexdir/NEWS +++ b/Build/source/texk/web2c/pdftexdir/NEWS @@ -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 3.14159265-2.6-1.40.19 (TeX Live 2018) (April 14, 2018) (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 diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web index 78b9ecd70ce..82875c247ec 100644 --- a/Build/source/texk/web2c/pdftexdir/pdftex.web +++ b/Build/source/texk/web2c/pdftexdir/pdftex.web @@ -5692,7 +5692,8 @@ that will be defined later. @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} -@d pdf_int_pars=pdftex_first_integer_code + 32 {total number of \pdfTeX's integer parameters} +@d pdf_include_charset_code = pdftex_first_integer_code + 32 {suppress /PTEX.* entries in PDF dictionaries} +@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 @@ that will be defined later. @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) +@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_dup_map_code: print_esc("pdfsuppresswarningdupmap"); 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("pdfsuppresswarningdupmap",assign_int,int_base+pdf_suppress_warning_du 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 @@ begin 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; diff --git a/Build/source/texk/web2c/pdftexdir/writefont.c b/Build/source/texk/web2c/pdftexdir/writefont.c index 7e4fbc0223d..adda570dab7 100644 --- a/Build/source/texk/web2c/pdftexdir/writefont.c +++ b/Build/source/texk/web2c/pdftexdir/writefont.c @@ -484,16 +484,22 @@ 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, 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 @@ static void write_fontdescriptor(fd_entry * fd) 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)) |