[latex3-commits] [git/LaTeX3-latex3-latex2e] glyphtounicode: Add support for legacy engine versions (79e78c12)

Marcel Fabian Krüger tex at 2krueger.de
Thu Jan 21 22:54:12 CET 2021


Repository : https://github.com/latex3/latex2e
On branch  : glyphtounicode
Link       : https://github.com/latex3/latex2e/commit/79e78c128464e83b721d1f9d904e6bcd1bea9ed5

>---------------------------------------------------------------

commit 79e78c128464e83b721d1f9d904e6bcd1bea9ed5
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Thu Jan 21 19:36:35 2021 +0100

    Add support for legacy engine versions


>---------------------------------------------------------------

79e78c128464e83b721d1f9d904e6bcd1bea9ed5
 base/ltfinal.dtx                                   | 25 +++++++++++++++++++++-
 .../tlb-latexrelease-rollback-003-often.luatex.tlg |  4 ++++
 .../tlb-latexrelease-rollback-003-often.tlg        |  4 ++++
 .../tlb-latexrelease-rollback-003-often.xetex.tlg  |  4 ++++
 base/testfiles/tlb-rollback-004-often.luatex.tlg   |  2 ++
 base/testfiles/tlb-rollback-004-often.tlg          |  2 ++
 base/testfiles/tlb-rollback-004-often.xetex.tlg    |  2 ++
 7 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index 0fd6b1a7..0c182cca 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -576,7 +576,30 @@
 %<latexrelease>\IncludeInRelease{2021/05/01}%
 %<latexrelease>                 {\pdfgentounicode}{Preload glyphtounicode}%
 \ifx \pdfgentounicode \@undefined \else
-  \input glyphtounicode
+%<*2ekernel>
+  \ifnum 0=0%
+    \ifdefined\pdftexversion
+% \pdftexversion<140 does not have \pdfgentounicode, so we only check higher values
+      \ifnum \pdftexversion=140 \ifnum\pdftexrevision<22 1\fi\fi
+    \fi
+    \relax
+%</2ekernel>
+    \input glyphtounicode
+%<*2ekernel>
+  \else
+    \begingroup
+      \toks@\expandafter{\the\everyjob}%
+      \openin0"glyphtounicode"
+      \loop\unless\ifeof0
+        \read0 to \glyphline
+        \toks@\expandafter{\the\expandafter\toks@\glyphline}%
+      \repeat
+      \closein0
+      \expandafter
+    \endgroup
+    \expandafter\everyjob\expandafter{\the\toks@}%
+  \fi
+%</2ekernel>
   \pdfgentounicode=1
 \fi
 %</2ekernel|latexrelease>
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 0a81d6cf..7679e2b8 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -458,6 +458,8 @@ Skipping: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] XeTeX character classes on input line ....
 Skipping: [....-..-..] Save language for hyphenation on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Skipping: [....-..-..] UTF-8 default on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 )
@@ -1005,6 +1007,8 @@ Applying: [....-..-..] XeTeX character classes on input line ....
 Already applied: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
 Already applied: [....-..-..] Save language for hyphenation on input line ...
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
index 3100d9d3..a9ebfa9b 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -452,6 +452,8 @@ Skipping: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] XeTeX character classes on input line ....
 Skipping: [....-..-..] Save language for hyphenation on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Skipping: [....-..-..] UTF-8 default on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 )
@@ -989,6 +991,8 @@ Applying: [....-..-..] XeTeX character classes on input line ....
 Already applied: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
 Already applied: [....-..-..] Save language for hyphenation on input line ...
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 (utf8.def
 File: utf8.def ....-..-.. v... UTF-8 support for inputenc
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
index fd4391cf..c1400973 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -461,6 +461,8 @@ Reading Unicode east Asian character class data
 )
 Skipping: [....-..-..] Save language for hyphenation on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Skipping: [....-..-..] UTF-8 default on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 )
@@ -1006,6 +1008,8 @@ Reading Unicode east Asian character class data
 Already applied: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
 Already applied: [....-..-..] Save language for hyphenation on input line ...
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
diff --git a/base/testfiles/tlb-rollback-004-often.luatex.tlg b/base/testfiles/tlb-rollback-004-often.luatex.tlg
index f3d8a7ca..376d09c2 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -863,6 +863,8 @@ Applying: [....-..-..] XeTeX character classes on input line ....
 Already applied: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
 Already applied: [....-..-..] Save language for hyphenation on input line ...
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )
diff --git a/base/testfiles/tlb-rollback-004-often.tlg b/base/testfiles/tlb-rollback-004-often.tlg
index 452d5982..6d24a7b4 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -851,6 +851,8 @@ Applying: [....-..-..] XeTeX character classes on input line ....
 Already applied: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
 Already applied: [....-..-..] Save language for hyphenation on input line ...
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 (utf8.def
 File: utf8.def ....-..-.. v... UTF-8 support for inputenc
diff --git a/base/testfiles/tlb-rollback-004-often.xetex.tlg b/base/testfiles/tlb-rollback-004-often.xetex.tlg
index 5eb7ad08..b01704b5 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -860,6 +860,8 @@ Reading Unicode east Asian character class data
 Already applied: [....-..-..] XeTeX character classes on input line ....
 Applying: [....-..-..] Save language for hyphenation on input line ....
 Already applied: [....-..-..] Save language for hyphenation on input line ...
+Skipping: [....-..-..] Preload glyphtounicode on input line ....
+Applying: [....-..-..] Preload glyphtounicode on input line ....
 Applying: [....-..-..] UTF-8 default on input line ....
 Already applied: [....-..-..] UTF-8 default on input line ....
 )





More information about the latex3-commits mailing list.