summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/media9
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-02-28 23:45:45 +0000
committerKarl Berry <karl@freefriends.org>2018-02-28 23:45:45 +0000
commitf454682b52ffa2e5948eb3f0c394b1f89a6555a3 (patch)
treee835e19995295b4f6e45fb445e499c3dfdbe55aa /Master/texmf-dist/tex/latex/media9
parentff16d3dc994ccd174f196f7d5cde42e8ba5338ff (diff)
media9 (28feb18)
git-svn-id: svn://tug.org/texlive/trunk@46766 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/media9')
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty4
-rw-r--r--Master/texmf-dist/tex/latex/media9/pdfbase.sty58
2 files changed, 47 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index 35418b5ce97..6c6bfb7d5d8 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -37,8 +37,8 @@
\RequirePackage{xparse}
\RequirePackage{atbegshi}
-\def\g@mix@date@tl{2018/01/18}
-\def\g@mix@version@tl{0.89}
+\def\g@mix@date@tl{2018/02/28}
+\def\g@mix@version@tl{0.90}
\def\g@mix@liiikerneldate{2017/05/29}
\def\g@mix@liiipkgdate{2017/05/29}
diff --git a/Master/texmf-dist/tex/latex/media9/pdfbase.sty b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
index 9d75443b930..4be270e1e6e 100644
--- a/Master/texmf-dist/tex/latex/media9/pdfbase.sty
+++ b/Master/texmf-dist/tex/latex/media9/pdfbase.sty
@@ -122,6 +122,17 @@
% \pbs_at_end_dvi:n
% #1: \specials or \write to be inserted on the very last page
%
+% --------
+%
+% \pbs_add_form_font: (pdfLaTeX, LuaLaTeX)
+% adds current font as a resource to the global /AcroForm dict, allowing
+% the font to be used in PDF Forms (theoretically, see
+% https://acrobat.uservoice.com/forums/590923-acrobat-for-windows-and-mac/
+% suggestions/33077827-bug-in-text-field-forms-embedded-opentype-font )
+% \pbs_last_form_font: (pdfLaTeX, LuaLaTeX)
+% expands to current font's resource name; to be used in the /DA (...)
+% entry of the Form dictionary
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This work may be distributed and/or modified under the
@@ -137,8 +148,8 @@
\RequirePackage{expl3}
\RequirePackage{l3keys2e}
-\def\g@pbs@date@tl{2018/01/18}
-\def\g@pbs@version@tl{0.20}
+\def\g@pbs@date@tl{2018/02/28}
+\def\g@pbs@version@tl{0.21}
\ProvidesExplPackage{pdfbase}{\g@pbs@date@tl}{\g@pbs@version@tl}
{driver independent access to low-level PDF features}
@@ -279,6 +290,7 @@
\cs_set_eq:NN\pdfxform\saveboxresource
\cs_set_eq:NN\pdfrefxform\useboxresource
\cs_set_eq:NN\pdflastxform\lastsavedboxresourceindex
+ \cs_set:Npn\pdffontobjnum{\pdffeedback~fontobjnum}
}
%helper func to remove `0 R' part from pdf obj reference
\cs_new_nopar:Nn\pbs_reftonum:n{\_pbs_reftonum:f{#1}}
@@ -443,6 +455,17 @@
}\l_pbs_temp_tl
}
}
+
+ \cs_new_nopar:Nn\pbs_add_form_font:{
+ \cs_if_exist:cF{pbs_form_font_\pdffontobjnum\font}{
+ \tl_new:c{pbs_form_font_\pdffontobjnum\font}
+ \tl_gput_right:Nx\g_pbs_form_fonts_tl{
+ ~/FormFont\pdffontobjnum\font\space\pdffontobjnum\font\space 0~R
+ }
+ }
+ \tl_gset:Nx\g_pbs_last_form_font_tl{/FormFont\pdffontobjnum\font}
+ }
+ \cs_new_nopar:Nn\pbs_last_form_font:{\g_pbs_last_form_font_tl}
}{
%pgf + transparency related settings
\bool_new:N\g_pbs_pgfloaded_bool
@@ -628,17 +651,19 @@
}
}
- \@ifpackageloaded{hyperref}{}{
- %define `?pdfmark' operator as in file hdvips.def from package `hyperref'
- \special{!~
- systemdict~/pdfmark~known
- {
- userdict~/?pdfmark~systemdict~/exec~get~put
- }{
- userdict~/?pdfmark~systemdict~/pop~get~put~
- userdict~/pdfmark~systemdict~/cleartomark~get~put
+ \AtBeginDocument{
+ \@ifpackageloaded{hyperref}{}{
+ %define `?pdfmark' operator as in file pdfmark.def from package `hyperref'
+ \special{!~
+ systemdict~/pdfmark~known
+ {
+ userdict~/?pdfmark~systemdict~/exec~get~put
+ }{
+ userdict~/?pdfmark~systemdict~/pop~get~put~
+ userdict~/pdfmark~systemdict~/cleartomark~get~put
+ }
+ ifelse~
}
- ifelse~
}
}
@@ -987,11 +1012,18 @@
%adding AcroForm dict to PDF Catalog
\tl_new:N\g_pbs_fields_tl %takes object IDs of Fields (aka annots with
+\tl_new:N\g_pbs_form_fonts_tl %name tree of font resources used in text fields
\pbs_at_end_dvi:n{
\tl_if_empty:NF\g_pbs_fields_tl{
\pbs_pdfobj:nnn{}{array}{\g_pbs_fields_tl}
\pbs_pdfcatalog:n{
- /AcroForm~<</Fields~\pbs_pdflastobj:/NeedAppearances~false>>}
+ /AcroForm~<<
+ /Fields~\pbs_pdflastobj:/NeedAppearances~false~
+ \tl_if_empty:NF\g_pbs_form_fonts_tl{
+ /DR~<</Font~<<\g_pbs_form_fonts_tl>> >>
+ }
+ >>
+ }
}
}
\cs_new_nopar:Nn\pbs_appendtofields:n{