[latex3-commits] [git/LaTeX3-latex3-latex2e] textcomp: split the defaults (0f745b72)

Frank Mittelbach frank.mittelbach at latex-project.org
Tue Nov 12 00:14:27 CET 2019


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

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

commit 0f745b72db97e83693ba9a8ba67c60e3c2b97b98
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Tue Nov 12 00:12:26 2019 +0100

    split the defaults


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

0f745b72db97e83693ba9a8ba67c60e3c2b97b98
 base/textcomp-adds.tex | 190 +++++++++++++++++++++++++++----------------------
 1 file changed, 104 insertions(+), 86 deletions(-)

diff --git a/base/textcomp-adds.tex b/base/textcomp-adds.tex
index 51e4aa24..4593635b 100644
--- a/base/textcomp-adds.tex
+++ b/base/textcomp-adds.tex
@@ -7,7 +7,9 @@
 
 \ifx\Umathcode\@undefined
 
-\def\textcompsubstdefault{cmr}
+\def\rmsubstdefault{cmr}
+\def\sfsubstdefault{cmss}
+\def\ttsubstdefault{cmtt}
 \input{ts1cmr.fd}
 
 % in pdftex pick up capital accents from TS1 if available 
@@ -45,27 +47,29 @@
 
 \else  % the unicode engine case
 
-\def\textcompsubstdefault{lmr}
+\def\rmsubstdefault{lmr}
+\def\sfsubstdefault{lmss}
+\def\ttsubstdefault{lmtt}
 \input{ts1lmr.fd}
 
 % in unicode engines make capital accents normal accents
 
-\def\newtie{\t}
-\def\capitaltie{\t}
-\def\capitalnewtie{\t}
-\def\capitalcedilla{\c}
-\def\capitalogonek{\k}
-\def\capitalgrave{\`}
 \def\capitalacute{\'}
+\def\capitalbreve{\u}
+\def\capitalcaron{\v}
+\def\capitalcedilla{\c}
 \def\capitalcircumflex{\^}
-\def\capitaltilde{\~}
 \def\capitaldieresis{\"}
+\def\capitaldotaccent{\.}
+\def\capitalgrave{\`}
 \def\capitalhungarumlaut{\H}
-\def\capitalring{\r}
-\def\capitalcaron{\v}
-\def\capitalbreve{\u}
 \def\capitalmacron{\=}
-\def\capitaldotaccent{\.}
+\def\capitalnewtie{\t}
+\def\capitalogonek{\k}
+\def\capitalring{\r}
+\def\capitaltie{\t}
+\def\capitaltilde{\~}
+\def\newtie{\t}
 
 % alternatively we could use TS1 accents if the subset of the current font is known and
 % complete (ie 0) but perhaps that overkill
@@ -148,7 +152,16 @@
     {Symbol \string#1 not provided by\MessageBreak
      font family \f at family\space
      in TS1 encoding.\MessageBreak Default family used instead}\@eha
-  \bgroup\fontfamily\textcompsubstdefault\selectfont#1\egroup
+  \bgroup
+      \ifx\f at family\sfdef at ult
+         \fontfamily\sfsubstdefault
+      \else\ifx\f at family\ttdef at ult
+         \fontfamily\ttsubstdefault
+      \else
+        \fontfamily\rmsubstdefault
+      \fi\fi
+      \selectfont#1%
+  \egroup
 }
 
 
@@ -165,7 +178,9 @@
    }%
 }
 \def\tc at check@symbol{\CheckEncodingSubset\UseTextSymbol{TS1}\tc at subst}
-\def\tc at check@accent{\CheckEncodingSubset\UseTextAccent{TS1}\tc at error}
+\def\tc at check@accent#1{\CheckEncodingSubset\UseTextAccent{TS1}{\tc at swap@accent#1}}
+
+\def\tc at swap@accent#1#2{\UseTextAccent{T1}#1}
 
 % for backwards compat we fetch smbols from OMS/OML in OT1/T1
 %\def\tc at compatibility@fetch#1#2{%
@@ -196,22 +211,25 @@
 \DeclareTextCommandDefault{\t}
   {\CheckEncodingSubset\UseTextAccent{TS1}{\UseTextAccent{OML}}1\t}
 
-%------------------ sub-enc 2 (majority of new OTF fonts via autoinst)
+% even if the captial accents are in a font they usually aren't really
+% we mark only a few font 0 even if they have a full set of glyphs
+
+\DeclareTextCommandDefault{\capitalacute}       {\tc at check@accent{\'}1\capitalacute}
+\DeclareTextCommandDefault{\capitalbreve}       {\tc at check@accent{\u}1\capitalbreve}
+\DeclareTextCommandDefault{\capitalcaron}       {\tc at check@accent{\v}1\capitalcaron}
+\DeclareTextCommandDefault{\capitalcircumflex}  {\tc at check@accent{\^}1\capitalcircumflex}
+\DeclareTextCommandDefault{\capitaldieresis}    {\tc at check@accent{\"}1\capitaldieresis}
+\DeclareTextCommandDefault{\capitaldotaccent}   {\tc at check@accent{\.}1\capitaldotaccent}
+\DeclareTextCommandDefault{\capitalgrave}       {\tc at check@accent{\`}1\capitalgrave}
+\DeclareTextCommandDefault{\capitalhungarumlaut}{\tc at check@accent{\H}1\capitalhungarumlaut}
+\DeclareTextCommandDefault{\capitalmacron}      {\tc at check@accent{\=}1\capitalmacron}
+\DeclareTextCommandDefault{\capitalnewtie}      {\tc at check@accent{\t}1\capitalnewtie}
+\DeclareTextCommandDefault{\capitalring}        {\tc at check@accent{\r}1\capitalring}
+\DeclareTextCommandDefault{\capitaltie}         {\tc at check@accent{\t}1\capitaltie}
+\DeclareTextCommandDefault{\capitaltilde}       {\tc at check@accent{\~}1\capitaltilde}
+\DeclareTextCommandDefault{\newtie}             {\tc at check@accent{\t}1\newtie}
 
-\DeclareTextCommandDefault{\capitalacute}       {\tc at check@accent2\capitalacute}
-\DeclareTextCommandDefault{\capitalbreve}       {\tc at check@accent2\capitalbreve}
-\DeclareTextCommandDefault{\capitalcaron}       {\tc at check@accent2\capitalcaron}
-\DeclareTextCommandDefault{\capitalcircumflex}  {\tc at check@accent2\capitalcircumflex}
-\DeclareTextCommandDefault{\capitaldieresis}    {\tc at check@accent2\capitaldieresis}
-\DeclareTextCommandDefault{\capitaldotaccent}   {\tc at check@accent2\capitaldotaccent}
-\DeclareTextCommandDefault{\capitalgrave}       {\tc at check@accent2\capitalgrave}
-\DeclareTextCommandDefault{\capitalmacron}      {\tc at check@accent2\capitalmacron}
-\DeclareTextCommandDefault{\capitalring}        {\tc at check@accent2\capitalring}
-\DeclareTextCommandDefault{\capitaltilde}       {\tc at check@accent2\capitaltilde}
-\DeclareTextCommandDefault{\capitalnewtie}      {\tc at check@accent2\capitalnewtie}
-\DeclareTextCommandDefault{\capitaltie}         {\tc at check@accent2\capitaltie}
-\DeclareTextCommandDefault{\capitalhungarumlaut}{\tc at check@accent2\capitalhungarumlaut}
-\DeclareTextCommandDefault{\newtie}             {\tc at check@accent2\newtie}
+%------------------ sub-enc 2 (majority of new OTF fonts via autoinst)
 
 % next two exists in some fonts (faked?), but we ignore that to get linear subsets
 
@@ -314,14 +332,14 @@
 
 %------------------ sub-enc 5 (most older PS fonts (they produce tofu if a symbol is missing)
 
-\DeclareTextCommandDefault{\textflorin}         {\tc at check@symbol5\textflorin}    
-\DeclareTextCommandDefault{\textcurrency}       {\tc at check@symbol5\textcurrency}
+\DeclareTextCommandDefault{\textestimated}      {\tc at check@symbol5\textestimated}
+\DeclareTextCommandDefault{\textnumero}         {\tc at check@symbol5\textnumero}
 
 
 %------------------ sub-enc 6
 
-\DeclareTextCommandDefault{\textestimated}      {\tc at check@symbol6\textestimated}
-\DeclareTextCommandDefault{\textnumero}         {\tc at check@symbol6\textnumero}
+\DeclareTextCommandDefault{\textflorin}         {\tc at check@symbol6\textflorin}    
+\DeclareTextCommandDefault{\textcurrency}       {\tc at check@symbol6\textcurrency}
 
 %------------------ sub-enc 7
 
@@ -548,25 +566,25 @@
 \DeclareEncodingSubset{TS1}{ptmj}    {2}
 \DeclareEncodingSubset{TS1}{ul8}     {2}
 
-\DeclareEncodingSubset{TS1}{dayroms} {5}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{dayrom}  {5}  % tofu for blank, interrobang/down, ohm 
 
+\DeclareEncodingSubset{TS1}{bch}     {5}  % tofu for blank, ohm 
+\DeclareEncodingSubset{TS1}{futj}    {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{futs}    {5}  % tofu for blank, ohm 
+\DeclareEncodingSubset{TS1}{futx}    {5}  % probably (currently broken distrib)
+\DeclareEncodingSubset{TS1}{pag}     {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{pbk}     {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{pcr}     {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{phv}     {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{pnc}     {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{pplj}    {5}  % tofu for blank
+\DeclareEncodingSubset{TS1}{pplx}    {5}  % tofu for blank
+\DeclareEncodingSubset{TS1}{ppl}     {5}  % tofu for blank interrobang/down
+\DeclareEncodingSubset{TS1}{ptm}     {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{pzc}     {5}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{ul9}     {5}  % tofu for blank, interrobang/down, ohm 
 
-\DeclareEncodingSubset{TS1}{bch}     {6}  % tofu for blank, ohm 
-\DeclareEncodingSubset{TS1}{futj}    {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{futs}    {6}  % tofu for blank, ohm 
-\DeclareEncodingSubset{TS1}{futx}    {6}  % probably (currently broken distrib)
-\DeclareEncodingSubset{TS1}{pag}     {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{pbk}     {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{pcr}     {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{phv}     {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{pnc}     {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{pplj}    {6}  % tofu for blank
-\DeclareEncodingSubset{TS1}{pplx}    {6}  % tofu for blank
-\DeclareEncodingSubset{TS1}{ppl}     {6}  % tofu for blank interrobang/down
-\DeclareEncodingSubset{TS1}{ptm}     {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{pzc}     {6}  % tofu for blank, interrobang/down, ohm 
-\DeclareEncodingSubset{TS1}{ul9}     {6}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{dayroms} {6}  % tofu for blank, interrobang/down, ohm 
+\DeclareEncodingSubset{TS1}{dayrom}  {6}  % tofu for blank, interrobang/down, ohm 
 
 
 \DeclareEncodingSubset{TS1}{augie}   {8}  % really only missing euro
@@ -656,39 +674,39 @@
 \DeclareEncodingSubset{TS1}{SticksTooText-*}          {4}
 \DeclareEncodingSubset{TS1}{UniversalisADFStd-LF}     {4}
 
-\DeclareEncodingSubset{TS1}{Crimson-TLF}              {5}
-\DeclareEncodingSubset{TS1}{IBMPlexMono-TLF}          {5}
-\DeclareEncodingSubset{TS1}{IBMPlexSerif-TLF}         {5}
-\DeclareEncodingSubset{TS1}{LibertinusMono-TLF}       {5}
-\DeclareEncodingSubset{TS1}{LibertinusSerifDisplay-LF}{5}
-\DeclareEncodingSubset{TS1}{LinuxLibertineDisplayT-*} {5}
-\DeclareEncodingSubset{TS1}{LinuxLibertineMonoT-LF}   {5}
-\DeclareEncodingSubset{TS1}{LinuxLibertineMonoT-TLF}  {5}
-\DeclareEncodingSubset{TS1}{Overlock-LF}              {5}
-
-
-\DeclareEncodingSubset{TS1}{Almendra-OsF}             {6} 
-\DeclareEncodingSubset{TS1}{Baskervaldx-*}            {6}
-\DeclareEncodingSubset{TS1}{BaskervilleF-*}           {6}
-\DeclareEncodingSubset{TS1}{Bitter-TLF}               {6}
-\DeclareEncodingSubset{TS1}{Cinzel-LF}                {6}
-\DeclareEncodingSubset{TS1}{CinzelDecorative-LF}      {6}
-\DeclareEncodingSubset{TS1}{DejaVuSerif-TLF}          {6}
-\DeclareEncodingSubset{TS1}{DejaVuSerifCondensed-TLF} {6}
-\DeclareEncodingSubset{TS1}{GilliusADF-LF}            {6}
-\DeclareEncodingSubset{TS1}{GilliusADFCond-LF}        {6}
-\DeclareEncodingSubset{TS1}{GilliusADFNoTwo-LF}       {6}
-\DeclareEncodingSubset{TS1}{GilliusADFNoTwoCond-LF}   {6}
-\DeclareEncodingSubset{TS1}{LobsterTwo-LF}            {6}
-\DeclareEncodingSubset{TS1}{OldStandard-TLF}          {6}
-\DeclareEncodingSubset{TS1}{PlayfairDisplay-TLF}      {6}
-\DeclareEncodingSubset{TS1}{PlayfairDisplay-TOsF}     {6}
-\DeclareEncodingSubset{TS1}{TheanoDidot-TLF}          {6}
-\DeclareEncodingSubset{TS1}{TheanoDidot-TOsF}         {6}
-\DeclareEncodingSubset{TS1}{TheanoModern-TLF}         {6}
-\DeclareEncodingSubset{TS1}{TheanoModern-TOsF}        {6}
-\DeclareEncodingSubset{TS1}{TheanoOldStyle-TLF}       {6}
-\DeclareEncodingSubset{TS1}{TheanoOldStyle-TOsF}      {6}
+
+\DeclareEncodingSubset{TS1}{Almendra-OsF}             {5} 
+\DeclareEncodingSubset{TS1}{Baskervaldx-*}            {5}
+\DeclareEncodingSubset{TS1}{BaskervilleF-*}           {5}
+\DeclareEncodingSubset{TS1}{Bitter-TLF}               {5}
+\DeclareEncodingSubset{TS1}{Cinzel-LF}                {5}
+\DeclareEncodingSubset{TS1}{CinzelDecorative-LF}      {5}
+\DeclareEncodingSubset{TS1}{DejaVuSerif-TLF}          {5}
+\DeclareEncodingSubset{TS1}{DejaVuSerifCondensed-TLF} {5}
+\DeclareEncodingSubset{TS1}{GilliusADF-LF}            {5}
+\DeclareEncodingSubset{TS1}{GilliusADFCond-LF}        {5}
+\DeclareEncodingSubset{TS1}{GilliusADFNoTwo-LF}       {5}
+\DeclareEncodingSubset{TS1}{GilliusADFNoTwoCond-LF}   {5}
+\DeclareEncodingSubset{TS1}{LobsterTwo-LF}            {5}
+\DeclareEncodingSubset{TS1}{OldStandard-TLF}          {5}
+\DeclareEncodingSubset{TS1}{PlayfairDisplay-TLF}      {5}
+\DeclareEncodingSubset{TS1}{PlayfairDisplay-TOsF}     {5}
+\DeclareEncodingSubset{TS1}{TheanoDidot-TLF}          {5}
+\DeclareEncodingSubset{TS1}{TheanoDidot-TOsF}         {5}
+\DeclareEncodingSubset{TS1}{TheanoModern-TLF}         {5}
+\DeclareEncodingSubset{TS1}{TheanoModern-TOsF}        {5}
+\DeclareEncodingSubset{TS1}{TheanoOldStyle-TLF}       {5}
+\DeclareEncodingSubset{TS1}{TheanoOldStyle-TOsF}      {5}
+
+\DeclareEncodingSubset{TS1}{Crimson-TLF}              {6}
+\DeclareEncodingSubset{TS1}{IBMPlexMono-TLF}          {6}
+\DeclareEncodingSubset{TS1}{IBMPlexSerif-TLF}         {6}
+\DeclareEncodingSubset{TS1}{LibertinusMono-TLF}       {6}
+\DeclareEncodingSubset{TS1}{LibertinusSerifDisplay-LF}{6}
+\DeclareEncodingSubset{TS1}{LinuxLibertineDisplayT-*} {6}
+\DeclareEncodingSubset{TS1}{LinuxLibertineMonoT-LF}   {6}
+\DeclareEncodingSubset{TS1}{LinuxLibertineMonoT-TLF}  {6}
+\DeclareEncodingSubset{TS1}{Overlock-LF}              {6}
 
 
 \DeclareEncodingSubset{TS1}{CormorantGaramond-*}      {7}
@@ -753,8 +771,8 @@
 
 
 % we go the roundabout way via separate OMS declarations so that
-%   \renewcommand\textdagger{\textlegacydagger}
-% doesn't prudce an endless loop
+%   \renewcommand\textbullet{\textlegacybullet}
+% doesn't produce an endless loop
 
 \DeclareTextSymbol{\textlegacyasteriskcentered}{OMS}{3}   % "03
 \DeclareTextSymbol{\textlegacybardbl}{OMS}{107}           % "6B





More information about the latex3-commits mailing list