[latex3-commits] [git/LaTeX3-latex3-latex2e] glyphtounicode: Add support for legacy engine versions (60658f3c)
Marcel Fabian Krüger
tex at 2krueger.de
Thu Jan 21 19:47:34 CET 2021
Repository : https://github.com/latex3/latex2e
On branch : glyphtounicode
Link : https://github.com/latex3/latex2e/commit/60658f3c1ffe383332467a77a596122592745ccb
>---------------------------------------------------------------
commit 60658f3c1ffe383332467a77a596122592745ccb
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Thu Jan 21 19:36:35 2021 +0100
Add support for legacy engine versions
>---------------------------------------------------------------
60658f3c1ffe383332467a77a596122592745ccb
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 ea10328d..e0e32bc1 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -572,7 +572,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
% \end{macrocode}
diff --git a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
index 413a426d..cbfb73d8 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.luatex.tlg
@@ -426,6 +426,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 ....
)
@@ -941,6 +943,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 baef9421..01bf26e6 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.tlg
@@ -420,6 +420,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 ....
)
@@ -925,6 +927,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 1095a886..045e4df2 100644
--- a/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
+++ b/base/testfiles/tlb-latexrelease-rollback-003-often.xetex.tlg
@@ -429,6 +429,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 ....
)
@@ -942,6 +944,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 1ace5b7e..b6ebbae1 100644
--- a/base/testfiles/tlb-rollback-004-often.luatex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.luatex.tlg
@@ -832,6 +832,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 5adb0b92..9a5259dd 100644
--- a/base/testfiles/tlb-rollback-004-often.tlg
+++ b/base/testfiles/tlb-rollback-004-often.tlg
@@ -820,6 +820,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 1af90ca7..ed4b5ef2 100644
--- a/base/testfiles/tlb-rollback-004-often.xetex.tlg
+++ b/base/testfiles/tlb-rollback-004-often.xetex.tlg
@@ -829,6 +829,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.