[latex3-commits] [git/LaTeX3-latex3-latex2e] develop, glyphtounicode: Add support for legacy engine versions (6e433470)

Marcel Fabian Krüger tex at 2krueger.de
Tue Feb 9 12:08:37 CET 2021


Repository : https://github.com/latex3/latex2e
On branches: develop,glyphtounicode
Link       : https://github.com/latex3/latex2e/commit/6e433470d695970f9dc64369fbf31cbdd31aca13

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

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

    Add support for legacy engine versions


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

6e433470d695970f9dc64369fbf31cbdd31aca13
 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 710a4efe..05694752 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -461,6 +461,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 ....
 )
@@ -1011,6 +1013,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 66d5cb70..db209cff 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -455,6 +455,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 ....
 )
@@ -995,6 +997,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 e4218d22..f3e4fac4 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -464,6 +464,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 ....
 )
@@ -1012,6 +1014,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 c203dad4..cadf21ba 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -866,6 +866,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 3c86f5fc..c8552a0f 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -854,6 +854,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 ba45bce7..21397295 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -863,6 +863,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.