[latex3-commits] [git/LaTeX3-latex3-latex2e] textcomp: also handle \textcircled (f391dc1)

Frank Mittelbach frank.mittelbach at latex-project.org
Wed Apr 17 15:21:10 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : textcomp
Link       : https://github.com/latex3/latex2e/commit/f391dc110405e63f5e38a2901246d29fed898046

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

commit f391dc110405e63f5e38a2901246d29fed898046
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Wed Apr 17 15:21:10 2019 +0200

    also handle \textcircled


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

f391dc110405e63f5e38a2901246d29fed898046
 base/testfiles-TU/tu-textcomp-003.luatex.tlg |   36 ++++------------------
 base/testfiles-TU/tu-textcomp-003.xetex.tlg  |   38 ++++--------------------
 base/testfiles-TU/tu-textcomp-004.luatex.tlg |   38 +++++-------------------
 base/testfiles-TU/tu-textcomp-004.xetex.tlg  |   40 +++++--------------------
 base/testfiles/github-robust-0123.luatex.tlg |    4 +--
 base/testfiles/github-robust-0123.lvt        |   14 ++-------
 base/testfiles/github-robust-0123.tlg        |    4 +--
 base/testfiles/github-robust-0123.xetex.tlg  |   41 +-------------------------
 base/textcomp-adds.tex                       |   24 +++++++++++++--
 9 files changed, 53 insertions(+), 186 deletions(-)

diff --git a/base/testfiles-TU/tu-textcomp-003.luatex.tlg b/base/testfiles-TU/tu-textcomp-003.luatex.tlg
index 69255be..ee86f0a 100644
--- a/base/testfiles-TU/tu-textcomp-003.luatex.tlg
+++ b/base/testfiles-TU/tu-textcomp-003.luatex.tlg
@@ -3665,37 +3665,11 @@ ne \ETC.}
 ....\glue(\spaceskip) 5.25
 ....\TU/lmtt/m/n/10 A
 ....\glue(\spaceskip) 3.33 plus 1.66331 minus 1.1111
-....\vbox(7.46141+0.0)x7.5, direction TLT
-.....\hbox(7.46141+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(7.46141+0.0)x7.5, direction TLT
-.......\glue 0.0 plus 1.0fil
-.......\hbox(7.16+0.0)x7.5, shifted -0.3014, direction TLT
-........\TU/lmr/m/n/10 A
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5, direction TLT
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
+....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 ⃝
 ....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
-....\vbox(7.13141+0.0)x7.5, direction TLT
-.....\hbox(7.13141+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(7.13141+0.0)x7.5, direction TLT
-.......\glue 0.0 plus 1.0fil
-.......\hbox(6.83+0.0)x7.5, shifted -0.3014, direction TLT
-........\TU/lmr/m/n/10 X
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5, direction TLT
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
+....\TU/lmr/m/n/10 X
+....\TU/lmr/m/n/10 ⃝
 ....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
 ....\TU/lmr/m/n/10 (
 ....\TU/lmr/m/n/10 b
@@ -3883,4 +3857,6 @@ ne \ETC.}
 ...\glue 0.0 plus 1.0fil
 ...\TU/lmr/m/n/10 4
 ...\glue 0.0 plus 1.0fil
+Missing character: There is no ⃝ (U+20DD) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no ⃝ (U+20DD) in font [lmroman10-regular]:+tlig;!
 (tu-textcomp-003.aux)
diff --git a/base/testfiles-TU/tu-textcomp-003.xetex.tlg b/base/testfiles-TU/tu-textcomp-003.xetex.tlg
index 303220b..1529ad3 100644
--- a/base/testfiles-TU/tu-textcomp-003.xetex.tlg
+++ b/base/testfiles-TU/tu-textcomp-003.xetex.tlg
@@ -1934,6 +1934,8 @@ Completed box being shipped out [3]
 ...\glue 0.0 plus 1.0fil
 ...\TU/lmr/m/n/10 3
 ...\glue 0.0 plus 1.0fil
+Missing character: There is no ⃝ in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no ⃝ in font [lmroman10-regular]:mapping=tex-text;!
 Completed box being shipped out [4]
 \vbox(633.0+0.0)x407.0
 .\glue 16.0
@@ -1969,7 +1971,7 @@ Completed box being shipped out [4]
 ...\glue 9.913 plus 0.86198
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\baselineskip) 1.70642
-...\hbox(7.5+2.49998)x345.0, glue set 93.32999fil
+...\hbox(7.5+2.49998)x345.0, glue set 87.72998fil
 ....\hbox(0.0+0.0)x0.0
 ....\setlanguage1 (hyphenmin 2,3)
 ....\TU/lmtt/m/n/10 \textcircled
@@ -1977,39 +1979,11 @@ Completed box being shipped out [4]
 ....\glue 5.25
 ....\TU/lmtt/m/n/10 A
 ....\glue 3.33 plus 1.66331 minus 1.1111
-....\vbox(7.46141+0.0)x7.5
-.....\hbox(7.46141+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(7.46141+0.0)x7.5
-.......\glue 0.0 plus 1.0fil
-.......\hbox(7.16+0.0)x7.5, shifted -0.3014
-........\TU/lmr/m/n/10 A
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
+....\setlanguage0 (hyphenmin 2,3)
+....\TU/lmr/m/n/10 A⃝
 ....\glue 3.33 plus 1.665 minus 1.11
-....\vbox(7.13141+0.0)x7.5
-.....\hbox(7.13141+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(7.13141+0.0)x7.5
-.......\glue 0.0 plus 1.0fil
-.......\hbox(6.83+0.0)x7.5, shifted -0.3014
-........\TU/lmr/m/n/10 X
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
+....\TU/lmr/m/n/10 X⃝
 ....\glue 3.33 plus 1.665 minus 1.11
-....\setlanguage0 (hyphenmin 2,3)
 ....\TU/lmr/m/n/10 (but
 ....\glue 3.33 plus 1.665 minus 1.11
 ....\TU/lmr/m/n/10 wrong
diff --git a/base/testfiles-TU/tu-textcomp-004.luatex.tlg b/base/testfiles-TU/tu-textcomp-004.luatex.tlg
index cb66c5c..6c7f0b4 100644
--- a/base/testfiles-TU/tu-textcomp-004.luatex.tlg
+++ b/base/testfiles-TU/tu-textcomp-004.luatex.tlg
@@ -3540,37 +3540,11 @@ ne \ETC.}
 ....\glue(\spaceskip) 5.25
 ....\TU/lmtt/m/n/10 A
 ....\glue(\spaceskip) 3.33 plus 1.66331 minus 1.1111
-....\vbox(7.46141+0.0)x7.5, direction TLT
-.....\hbox(7.46141+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(7.46141+0.0)x7.5, direction TLT
-.......\glue 0.0 plus 1.0fil
-.......\hbox(7.16+0.0)x7.5, shifted -0.3014, direction TLT
-........\TU/lmr/m/n/10 A
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5, direction TLT
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
-....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
-....\vbox(7.13141+0.0)x7.5, direction TLT
-.....\hbox(7.13141+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(7.13141+0.0)x7.5, direction TLT
-.......\glue 0.0 plus 1.0fil
-.......\hbox(6.83+0.0)x7.5, shifted -0.3014, direction TLT
-........\TU/lmr/m/n/10 X
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5, direction TLT
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5, direction TLT
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
+....\TU/lmr/m/n/10 A
+....\TU/lmr/m/n/10 ⃝
+....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 X
+....\TU/lmr/m/n/10 ⃝
 ....\glue(\spaceskip) 3.33 plus 1.665 minus 1.11
 ....\TU/lmr/m/n/10 (
 ....\TU/lmr/m/n/10 b
@@ -3758,4 +3732,6 @@ ne \ETC.}
 ...\glue 0.0 plus 1.0fil
 ...\TU/lmr/m/n/10 4
 ...\glue 0.0 plus 1.0fil
+Missing character: There is no ⃝ (U+20DD) in font [lmroman10-regular]:+tlig;!
+Missing character: There is no ⃝ (U+20DD) in font [lmroman10-regular]:+tlig;!
 (tu-textcomp-004.aux)
diff --git a/base/testfiles-TU/tu-textcomp-004.xetex.tlg b/base/testfiles-TU/tu-textcomp-004.xetex.tlg
index ec76502..38676d4 100644
--- a/base/testfiles-TU/tu-textcomp-004.xetex.tlg
+++ b/base/testfiles-TU/tu-textcomp-004.xetex.tlg
@@ -1821,6 +1821,8 @@ Completed box being shipped out [3]
 ...\glue 0.0 plus 1.0fil
 ...\TU/lmr/m/n/10 3
 ...\glue 0.0 plus 1.0fil
+Missing character: There is no ⃝ in font [lmroman10-regular]:mapping=tex-text;!
+Missing character: There is no ⃝ in font [lmroman10-regular]:mapping=tex-text;!
 Completed box being shipped out [4]
 \vbox(633.0+0.0)x407.0
 .\glue 16.0
@@ -1856,7 +1858,7 @@ Completed box being shipped out [4]
 ...\glue 9.913 plus 0.86198
 ...\glue(\parskip) 0.0 plus 1.0
 ...\glue(\baselineskip) 1.70642
-...\hbox(7.5+2.49998)x345.0, glue set 93.32999fil
+...\hbox(7.5+2.49998)x345.0, glue set 87.72998fil
 ....\hbox(0.0+0.0)x0.0
 ....\setlanguage1 (hyphenmin 2,3)
 ....\TU/lmtt/m/n/10 \textcircled
@@ -1864,39 +1866,11 @@ Completed box being shipped out [4]
 ....\glue 5.25
 ....\TU/lmtt/m/n/10 A
 ....\glue 3.33 plus 1.66331 minus 1.1111
-....\vbox(7.46141+0.0)x7.5
-.....\hbox(7.46141+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(7.46141+0.0)x7.5
-.......\glue 0.0 plus 1.0fil
-.......\hbox(7.16+0.0)x7.5, shifted -0.3014
-........\TU/lmr/m/n/10 A
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
-....\glue 3.33 plus 1.665 minus 1.11
-....\vbox(7.13141+0.0)x7.5
-.....\hbox(7.13141+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(7.13141+0.0)x7.5
-.......\glue 0.0 plus 1.0fil
-.......\hbox(6.83+0.0)x7.5, shifted -0.3014
-........\TU/lmr/m/n/10 X
-.......\glue 0.0 plus 1.0fil
-......\glue(\tabskip) 0.0
-.....\glue(\baselineskip) -6.9445
-.....\hbox(6.9445+0.0)x7.5
-......\glue(\tabskip) 0.0
-......\hbox(6.9445+0.0)x7.5
-.......\TS1/lmr/m/n/10 O
-......\glue(\tabskip) 0.0
-....\glue 3.33 plus 1.665 minus 1.11
 ....\setlanguage0 (hyphenmin 2,3)
+....\TU/lmr/m/n/10 A⃝
+....\glue 3.33 plus 1.665 minus 1.11
+....\TU/lmr/m/n/10 X⃝
+....\glue 3.33 plus 1.665 minus 1.11
 ....\TU/lmr/m/n/10 (but
 ....\glue 3.33 plus 1.665 minus 1.11
 ....\TU/lmr/m/n/10 wrong
diff --git a/base/testfiles/github-robust-0123.luatex.tlg b/base/testfiles/github-robust-0123.luatex.tlg
index 8106fd0..d7510a9 100644
--- a/base/testfiles/github-robust-0123.luatex.tlg
+++ b/base/testfiles/github-robust-0123.luatex.tlg
@@ -1596,8 +1596,6 @@ and I'll forget about whatever was undefined.
 ---------------------------------------
 \showboxdepth: \showboxdepth 
 ---------------------------------------
-\showhyphens{foo}: \setbox 0\vbox {\color at begingroup \everypar {}\parfillskip \z at skip \hsize \maxdimen \normalfont \pretolerance \m at ne \tolerance \m at ne \hbadness \z@ \showboxdepth \z@ \ foo\color at endgroup }
----------------------------------------
 \showoutput: \tracingoutput \@ne \showboxbreadth \maxdimen \showboxdepth \maxdimen \tracingonline \@ne 
 ---------------------------------------
 \showoverfull: \tracingonline \@ne 
@@ -1762,7 +1760,7 @@ and I'll forget about whatever was undefined.
 ---------------------------------------
 \textbullet: \textbullet 
 ---------------------------------------
-\textcircled: \textcircled 
+\textcircled{a}: \textcircled {a}
 ---------------------------------------
 \textcommaabove: \textcommaabove 
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.lvt b/base/testfiles/github-robust-0123.lvt
index 4ffd8e3..8b2c57b 100644
--- a/base/testfiles/github-robust-0123.lvt
+++ b/base/testfiles/github-robust-0123.lvt
@@ -112,6 +112,8 @@
 %%\test{\typeout}     -- breaks badly
 %%\test{\usecounter{page}}     -- breaks badly
 %%\test{\vphantom{foo}}     -- breaks badly
+%%\test{\showhyphens{foo}}  % breaks badly with xetex
+
 
 %\test{\begin{foo}}          % breaks really really badly
 
@@ -997,7 +999,6 @@
 \test{\shipout}
 \test{\showboxbreadth}
 \test{\showboxdepth}
-\test{\showhyphens{foo}}
 \test{\showoutput}
 \test{\showoverfull}
 \test{\sigma}
@@ -1080,7 +1081,7 @@
 \test{\textbraceleft}
 \test{\textbraceright}
 \test{\textbullet}
-\test{\textcircled}
+\test{\textcircled{a}}  % is really an accent
 \test{\textcommaabove}
 \test{\textcommabelow}
 \test{\textcompwordmark}
@@ -1345,12 +1346,3 @@
 \test{\whatsit}
 
 
-% why are these UI?
-
-\test{\parseunicodedataI}
-\test{\parseunicodedataII}
-\test{\parseunicodedataIII}
-\test{\parseunicodedataIV}
-\test{\parseunicodedataV}
-\test{\unicodedataline}
-\test{\unicoderead}
diff --git a/base/testfiles/github-robust-0123.tlg b/base/testfiles/github-robust-0123.tlg
index d10aaf8..94e6015 100644
--- a/base/testfiles/github-robust-0123.tlg
+++ b/base/testfiles/github-robust-0123.tlg
@@ -1580,8 +1580,6 @@ Don't change this file in any respect.
 ---------------------------------------
 \showboxdepth: \showboxdepth 
 ---------------------------------------
-\showhyphens{foo}: \setbox 0\vbox {\color at begingroup \everypar {}\parfillskip \z at skip \hsize \maxdimen \normalfont \pretolerance \m at ne \tolerance \m at ne \hbadness \z@ \showboxdepth \z@ \ foo\color at endgroup }
----------------------------------------
 \showoutput: \tracingoutput \@ne \showboxbreadth \maxdimen \showboxdepth \maxdimen \tracingonline \@ne 
 ---------------------------------------
 \showoverfull: \tracingonline \@ne 
@@ -1746,7 +1744,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \textbullet: \textbullet 
 ---------------------------------------
-\textcircled: \textcircled 
+\textcircled{a}: \textcircled {a}
 ---------------------------------------
 \textcommaabove: \textcommaabove 
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.xetex.tlg b/base/testfiles/github-robust-0123.xetex.tlg
index d463958..dd9aa3d 100644
--- a/base/testfiles/github-robust-0123.xetex.tlg
+++ b/base/testfiles/github-robust-0123.xetex.tlg
@@ -1596,45 +1596,6 @@ and I'll forget about whatever was undefined.
 ---------------------------------------
 \showboxdepth: \showboxdepth 
 ---------------------------------------
-! Incomplete \iffalse; all text was ignored after line 1000.
-<inserted text> 
-                \fi 
-l. ...\test{\showhyphens{foo}}
-A forbidden control sequence occurred in skipped text.
-This kind of error happens when you say `\if...' and forget
-the matching `\fi'. I've inserted a `\fi'; this might work.
-Runaway text?
-\showhyphens{foo}: \setbox 0\vbox {\fontencoding {TU}\fontfamily {lmr\ETC.
-! Forbidden control sequence found while scanning text of \write.
-<inserted text> 
-                }
-l. ...\test{\showhyphens{foo}}
-I suspect you have forgotten a `}', causing me
-to read past where you wanted me to stop.
-I'll try to recover; but if the error is serious,
-you'd better type `E' or `X' now and fix your file.
-Runaway text?
-\showhyphens{foo}: \setbox 0\vbox {\fontencoding {TU}\fontfamily {lmr\ETC.
-! Forbidden control sequence found while scanning text of \write.
-<inserted text> 
-                }
-l. ...\test{\showhyphens{foo}}
-I suspect you have forgotten a `}', causing me
-to read past where you wanted me to stop.
-I'll try to recover; but if the error is serious,
-you'd better type `E' or `X' now and fix your file.
-Runaway text?
-\showhyphens{foo}: \setbox 0\vbox {\fontencoding {TU}\fontfamily {lmr\ETC.
-! Forbidden control sequence found while scanning text of \write.
-<inserted text> 
-                }
-l. ...\test{\showhyphens{foo}}
-I suspect you have forgotten a `}', causing me
-to read past where you wanted me to stop.
-I'll try to recover; but if the error is serious,
-you'd better type `E' or `X' now and fix your file.
-\showhyphens{foo}: \setbox 0\vbox {\fontencoding {TU}\fontfamily {lmr}\fontseries {m}\fontshape {n}\selectfont \ignorespaces \hsize 1sp \hbadness \@M \hfuzz \maxdimen \tracingonline \z@ \everypar ={}\leftskip \z at skip \rightskip \z at skip \parfillskip \z at skip \hyphenpenalty =-\@M \pretolerance \m at ne \interlinepenalty \z@ \clubpenalty \z@ \widowpenalty \z@ \brokenpenalty 1127 \setbox \z@ \hbox {}\noindent \hskip \z at skip foo\par \def \iterate {\let  } } 
----------------------------------------
 \showoutput: \tracingoutput \@ne \showboxbreadth \maxdimen \showboxdepth \maxdimen \tracingonline \@ne 
 ---------------------------------------
 \showoverfull: \tracingonline \@ne 
@@ -1799,7 +1760,7 @@ you'd better type `E' or `X' now and fix your file.
 ---------------------------------------
 \textbullet: \textbullet 
 ---------------------------------------
-\textcircled: \textcircled 
+\textcircled{a}: \textcircled {a}
 ---------------------------------------
 \textcommaabove: \textcommaabove 
 ---------------------------------------
diff --git a/base/textcomp-adds.tex b/base/textcomp-adds.tex
index d12715a..4335003 100644
--- a/base/textcomp-adds.tex
+++ b/base/textcomp-adds.tex
@@ -44,7 +44,7 @@
 }
 
 
-\else
+\else  % the unicode engine case
 
 \def\textcompsubstdefault{lmr}
 \input{ts1lmr.fd}
@@ -366,7 +366,15 @@
 \ifx\Umathcode\@undefined
 \else
 
-\providecommand\UnicodeEncodingName{TU} % not always set up at this point
+ % not always set up at this point while not fully integrated
+\providecommand\UnicodeEncodingName{TU}
+
+\def\add at unicode@accent#1#2{%
+  \if\relax\detokenize{#2}\relax^^a0\else#2\fi
+  \char#1\relax}
+\def\DeclareUnicodeAccent#1#2#3{%
+  \DeclareTextCommand{#1}{#2}{\add at unicode@accent{#3}}%
+}
 
 % use \oldstylenums for these
 
@@ -390,6 +398,16 @@
 \DeclareTextSymbol{\textrbrackdbl}     \UnicodeEncodingName{"27E7}
 \DeclareTextSymbol{\textguarani}       \UnicodeEncodingName{"20B2}
 
+% this can't be set up if TU isn't loaded in the test suite config
+%
+% right now 20DD doesn't exist in LM, so maybe not a good idea at the moment
+% maybe test for the slot and do the fallback oalign if it doesn't exist
+%
+  \expandafter\ifx\csname TU-cmd\endcsname\relax
+  \else
+    \DeclareUnicodeAccent{\textcircled}    \UnicodeEncodingName{"20DD}
+  \fi
+
 \fi
 
 % we could make them point to dollar and cent glyphs in TU
@@ -400,7 +418,7 @@
 
 % but I think it is better to pick them up from TS1 even if that usually means LMR fonts
 \DeclareTextSymbol{\textdollaroldstyle}{TS1}{138}
-\DeclareTextSymbol{\textcentoldstyle}{TS1}{139}
+\DeclareTextSymbol{\textcentoldstyle}  {TS1}{139}
 
 
 % we declare the subsets of a good number of fonts in the kernel ...





More information about the latex3-commits mailing list