diff options
Diffstat (limited to 'macros/latex-dev/base/lttextcomp.dtx')
-rw-r--r-- | macros/latex-dev/base/lttextcomp.dtx | 677 |
1 files changed, 628 insertions, 49 deletions
diff --git a/macros/latex-dev/base/lttextcomp.dtx b/macros/latex-dev/base/lttextcomp.dtx index 3602e0a6b0..c67bac00dd 100644 --- a/macros/latex-dev/base/lttextcomp.dtx +++ b/macros/latex-dev/base/lttextcomp.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2019-2023 +% Copyright (C) 2019-2024 % The LaTeX Project and any individual authors listed elsewhere % in this file. % @@ -37,7 +37,7 @@ % % \ProvidesFile{lttextcomp.dtx} - [2022/08/07 v1.0g LaTeX Kernel (text companion symbols)] + [2024/02/08 v1.1a LaTeX Kernel (text companion symbols)] % \iffalse \documentclass{ltxdoc} \begin{document} @@ -163,11 +163,12 @@ % % \begin{macro}{\DeclareEncodingSubset} % -% The declaration takes 3 mandatory arguments: an \emph{encoding} +% The declaration takes 3 mandatory arguments: an \emph{encoding} % for which a subsetting is wanted (currently always \texttt{TS1}, % and most likely forever), the \emph{font family} for which we -% declare the subset and finally the \emph{subset} number (between \texttt{0} (all -% of the encoding is supported) and \texttt{9} many glyphs are missing. +% declare the subset and finally the \emph{subset} number, with a value between +% \texttt{0} (all of the encoding is supported) and \texttt{9} (many +% glyphs are missing). % % For \texttt{TS1} the numbers have been chosen in a way that most % fonts can be fairly correctly categorized, but the default @@ -439,7 +440,7 @@ % \end{macrocode} % % And here are the other \texttt{TS1} glyphs that are implemented -% by every font (or nearly every---a few are commented out and +% by every font (or nearly every)---a few are commented out and % moved to sub-encoding 9, % because they aren't around in some fonts. % \begin{macrocode} @@ -950,6 +951,8 @@ % This first block contains the fonts that have been already % supported by the \texttt{textcomp} package way back, i.e., the % font families that have \TeX{} support since the mid-nineties. +% \changes{v1.1a}{2024/01/27}{Adjusted/corrected TS1 sub-encoding +% declarations for various families (gh/1257)} % \begin{macrocode} \DeclareEncodingSubset{TS1}{ccr} {0} \DeclareEncodingSubset{TS1}{cmbr} {0} @@ -981,16 +984,28 @@ \DeclareEncodingSubset{TS1}{lmss} {1} \DeclareEncodingSubset{TS1}{lmssq} {1} \DeclareEncodingSubset{TS1}{lmvtt} {1} -\DeclareEncodingSubset{TS1}{lmtt} {1} % missing TM, SM and - % pertenthousand for some reason +% \end{macrocode} +% The lmtt family is missing TM, SM, and perthousand for some +% reason, so the first safe sub-encoding would be 2, but that is +% then missing out a huge number of glyphs that are available, so +% we claim it is sub-encoding 1 even if this can lead to missing glyphs. +% \begin{macrocode} +\DeclareEncodingSubset{TS1}{lmtt} {1} % missing TM, SM and pertenthousand % \end{macrocode} % +% The next three families have been removed from TeX Live, but we +% keep the definitions % \begin{macrocode} \DeclareEncodingSubset{TS1}{ptmx} {2} \DeclareEncodingSubset{TS1}{ptmj} {2} \DeclareEncodingSubset{TS1}{ul8} {2} % \end{macrocode} % +% The next set are the early PostScript font implementations, these +% days there are better alternatives, but \ldots. Note that, their +% virtual fonts contain a lot of ``tofu'' in form of black squares, +% thus they don't even give a missing character warning if you +% select such a glyph. This is why they are set as sub-encoding 5. % \begin{macrocode} \DeclareEncodingSubset{TS1}{bch} {5} % tofu for blank, ohm \DeclareEncodingSubset{TS1}{futj}{5} % tofu for blank, interrobang/down, ohm @@ -1009,12 +1024,11 @@ \DeclareEncodingSubset{TS1}{ul9} {5} % tofu for blank, interrobang/down, ohm % \end{macrocode} % +% The next set suffers from the same problem and they contain even +% fewer real glyphs. % \begin{macrocode} \DeclareEncodingSubset{TS1}{dayroms}{6} % tofu for blank, interrobang/down, ohm \DeclareEncodingSubset{TS1}{dayrom} {6} % tofu for blank, interrobang/down, ohm -% \end{macrocode} -% -% \begin{macrocode} \DeclareEncodingSubset{TS1}{augie}{8} % really only missing euro \DeclareEncodingSubset{TS1}{put} {8} \DeclareEncodingSubset{TS1}{uag} {8} % probably (currently broken distrib) @@ -1024,6 +1038,7 @@ % \begin{macrocode} \DeclareEncodingSubset{TS1}{zi4} {9} % \end{macrocode} +% % LucidaBright (sold through TUG) probably not quite correct, I % guess as I have the older fonts \ldots % \begin{macrocode} @@ -1041,44 +1056,72 @@ % Below are the newer fonts that have support files for % \LaTeX{}. With very few exceptions the classifications are done % so that all characters are correctly produced (either being -% available in the font or substituted. +% available in the font or substituted). % % There are a few fonts that contain ``tofu'' squares in places % (instead of a real glyph) and in a few cases some really seldom % needed chars are unavailable, i.e., produce missing glyphs (to % avoid that a large number of available chars are unnecessarily -% substituted. +% substituted). % +% Encoding declarations for these font families shouldn't really be +% in the kernel, but part of the \texttt{.fd} files for the +% family. When we introduced the concept in 2021 we had some hope +% that this would happen over time and that we could take the +% declarations out---after all it is nearly impossible to maintain +% it correctly in the kernel, given that fonts may get new glyphs +% added (happened for several of them in the recent year) which is +% something we wouldn't notice. However, so far this hasn't +% happened, so in 2024, I went through the current set and adjusted +% the declarations in several places. +% +% Next four are wrong and still need adjustment: % \begin{macrocode} \DeclareEncodingSubset{TS1}{lato-*} {0} % with a bunch of tofu inside \DeclareEncodingSubset{TS1}{opensans-*} {0} % with a bunch of tofu inside \DeclareEncodingSubset{TS1}{cantarell-*} {0} % with a bunch of tofu inside -\DeclareEncodingSubset{TS1}{fbb-*} {0} % missing centoldstyle +\DeclareEncodingSubset{TS1}{tli} {1} % with lots of tofu inside % \end{macrocode} % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{tli} {1} % with lots of tofu inside +\DeclareEncodingSubset{TS1}{fbb-*} {2} % missing centoldstyle % \end{macrocode} % +% % \begin{macrocode} \DeclareEncodingSubset{TS1}{Alegreya-*} {2} \DeclareEncodingSubset{TS1}{AlegreyaSans-*} {2} +\DeclareEncodingSubset{TS1}{BaskervilleF-*} {2} \DeclareEncodingSubset{TS1}{DejaVuSans-TLF} {2} \DeclareEncodingSubset{TS1}{DejaVuSansCondensed-TLF} {2} +% \end{macrocode} +% Next one is missing \cs{textfractionsolidus} but is otherwise +% completely sub-encoding 2 so we use that sub-encoding. +% \begin{macrocode} \DeclareEncodingSubset{TS1}{DejaVuSansMono-TLF} {2} +% \end{macrocode} +% +% \begin{macrocode} \DeclareEncodingSubset{TS1}{EBGaramond-*} {2} +\DeclareEncodingSubset{TS1}{Merriwthr-OsF} {2} +\DeclareEncodingSubset{TS1}{MerriwthrSans-OsF} {2} +\DeclareEncodingSubset{TS1}{Montserrat-*} {2} +\DeclareEncodingSubset{TS1}{MontserratAlternates-*} {2} +\DeclareEncodingSubset{TS1}{NotoSansMono-TLF} {2} +\DeclareEncodingSubset{TS1}{NotoSansMono-TOsF} {2} \DeclareEncodingSubset{TS1}{Tempora-TLF} {2} \DeclareEncodingSubset{TS1}{Tempora-TOsF} {2} +\DeclareEncodingSubset{TS1}{XCharter-TLF} {2} +\DeclareEncodingSubset{TS1}{XCharter-TOsF} {2} +\DeclareEncodingSubset{TS1}{erewhon-*} {2} % \end{macrocode} % % \begin{macrocode} \DeclareEncodingSubset{TS1}{Arimo-TLF} {3} -\DeclareEncodingSubset{TS1}{Carlito-*} {3} -\DeclareEncodingSubset{TS1}{FiraSans-*} {3} +\DeclareEncodingSubset{TS1}{Crlt-*} {3} +\DeclareEncodingSubset{TS1}{IBMPlexMono-TLF} {3} \DeclareEncodingSubset{TS1}{IBMPlexSans-TLF} {3} -\DeclareEncodingSubset{TS1}{Merriweather-OsF} {3} -\DeclareEncodingSubset{TS1}{Montserrat-*} {3} -\DeclareEncodingSubset{TS1}{MontserratAlternates-*} {3} +\DeclareEncodingSubset{TS1}{IBMPlexSerif-TLF} {3} \DeclareEncodingSubset{TS1}{SourceCodePro-TLF} {3} \DeclareEncodingSubset{TS1}{SourceCodePro-TOsF} {3} \DeclareEncodingSubset{TS1}{SourceSansPro-*} {3} @@ -1096,6 +1139,7 @@ \DeclareEncodingSubset{TS1}{CrimsonPro-*} {4} \DeclareEncodingSubset{TS1}{FiraMono-TLF} {4} \DeclareEncodingSubset{TS1}{FiraMono-TOsF} {4} +\DeclareEncodingSubset{TS1}{FiraSans-*} {4} \DeclareEncodingSubset{TS1}{Go-TLF} {4} \DeclareEncodingSubset{TS1}{GoMono-TLF} {4} \DeclareEncodingSubset{TS1}{InriaSans-*} {4} @@ -1108,7 +1152,6 @@ \DeclareEncodingSubset{TS1}{LinguisticsPro-OsF} {4} \DeclareEncodingSubset{TS1}{LinuxBiolinumT-*} {4} \DeclareEncodingSubset{TS1}{LinuxLibertineT-*} {4} -\DeclareEncodingSubset{TS1}{MerriweatherSans-OsF} {4} \DeclareEncodingSubset{TS1}{MintSpirit-*} {4} \DeclareEncodingSubset{TS1}{MintSpiritNoTwo-*} {4} \DeclareEncodingSubset{TS1}{PTMono-TLF} {4} @@ -1128,66 +1171,64 @@ % \end{macrocode} % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{Almendra-OsF} {5} +\DeclareEncodingSubset{TS1}{Almndr-OsF} {5} \DeclareEncodingSubset{TS1}{Baskervaldx-*} {5} -\DeclareEncodingSubset{TS1}{BaskervilleF-*} {5} -\DeclareEncodingSubset{TS1}{Bitter-TLF} {5} +\DeclareEncodingSubset{TS1}{Bttr-TLF} {5} \DeclareEncodingSubset{TS1}{Cinzel-LF} {5} \DeclareEncodingSubset{TS1}{CinzelDecorative-LF} {5} +\DeclareEncodingSubset{TS1}{Cochineal-*} {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}{PlyfrDisplay-TLF} {5} +\DeclareEncodingSubset{TS1}{PlyfrDisplay-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}{charssil-TLF} {5} % \end{macrocode} % % \begin{macrocode} \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}{Ovrlck-LF} {6} % \end{macrocode} % % \begin{macrocode} +\DeclareEncodingSubset{TS1}{ComicNeue-TLF} {7} +\DeclareEncodingSubset{TS1}{ComicNeueAngular-TLF} {7} \DeclareEncodingSubset{TS1}{CormorantGaramond-*} {7} \DeclareEncodingSubset{TS1}{Heuristica-TLF} {7} \DeclareEncodingSubset{TS1}{Heuristica-TOsF} {7} \DeclareEncodingSubset{TS1}{IMFELLEnglish-TLF} {7} -\DeclareEncodingSubset{TS1}{LibreBaskerville-TLF} {7} -\DeclareEncodingSubset{TS1}{LibreCaslon-*} {7} -\DeclareEncodingSubset{TS1}{Marcellus-LF} {7} +\DeclareEncodingSubset{TS1}{LibreBskrvl-TLF} {7} +\DeclareEncodingSubset{TS1}{LibreCsln-*} {7} +\DeclareEncodingSubset{TS1}{Lbstr-LF} {7} +\DeclareEncodingSubset{TS1}{Mrcls-LF} {7} +% \end{macrocode} +% Strangely enough NotoSerif and NotoSans are sub-encoding 7 as +% they are missing \cs{textminus} and several other glyphs. In +% contrast the NotoSansMono is far more complete. +% \begin{macrocode} \DeclareEncodingSubset{TS1}{NotoSans-*} {7} -\DeclareEncodingSubset{TS1}{NotoSansMono-TLF} {7} -\DeclareEncodingSubset{TS1}{NotoSansMono-TOsF} {7} \DeclareEncodingSubset{TS1}{NotoSerif-*} {7} -\DeclareEncodingSubset{TS1}{Quattrocento-TLF} {7} -\DeclareEncodingSubset{TS1}{QuattrocentoSans-TLF} {7} -\DeclareEncodingSubset{TS1}{XCharter-TLF} {7} -\DeclareEncodingSubset{TS1}{XCharter-TOsF} {7} -\DeclareEncodingSubset{TS1}{erewhon-*} {7} -\DeclareEncodingSubset{TS1}{ComicNeue-TLF} {7} -\DeclareEncodingSubset{TS1}{ComicNeueAngular-TLF} {7} -\DeclareEncodingSubset{TS1}{Forum-LF} {7} % the superiors are missing +\DeclareEncodingSubset{TS1}{Quattro-LF} {7} +\DeclareEncodingSubset{TS1}{QuattroSans-LF} {7} +\DeclareEncodingSubset{TS1}{Frm-LF} {7} % the superiors are missing % \end{macrocode} % % \begin{macrocode} -\DeclareEncodingSubset{TS1}{Cochineal-*} {8} +\DeclareEncodingSubset{TS1}{LibertinusMono-TLF} {8} % \end{macrocode} % % \begin{macrocode} @@ -1231,7 +1272,7 @@ % % Here are new names for the legacy symbols that \LaTeX{} used to % pick up from the \texttt{OMS} encoded fonts (and used for itemize -% lists or footnote symbols. +% lists or footnote symbols). % % We go the roundabout way via separate OMS declarations so that %\begin{verbatim} @@ -1481,7 +1522,6 @@ % % % -% % \section{The \texttt{textcomp} package} % % @@ -1706,7 +1746,7 @@ % The default is ``almostfull'' which means that old documents will % work except that |\textcircled| and |\t| will use the kernel % defaults (with the advantage that this also works if the current -% font (as often the case) doesn't implement these glyphs. +% font, as often the case, doesn't implement these glyphs). % % The ``force'' option simply sets the switch to true. % \begin{macrocode} @@ -2301,8 +2341,547 @@ % \begin{macrocode} %</TS1oldsty> % \end{macrocode} +% +% +% +% +% \section{The \texttt{checkencodingsubset.tex} file} +% +% This is a simple file that asks for a name of a font family and +% then displays information about the TS1 encoding for this family +% and recommends the right encoding subset (to be used with +% \cs{DeclareEncodingsubset}) for this family. +% \changes{v1.1a}{2024/01/27}{Added check file for encoding subset} +% \begin{macrocode} +%<*TS1check> +\Providesfile{checkencodingsubset.tex} + [2024/01/27 v0.5a Figure out safe TS1 encoding subsets] +% \end{macrocode} +% +% \begin{macrocode} +\let\typeoutdetails\typeout +%\def\typeoutdetails#1{} % alternative definition used below +% \end{macrocode} +% +% For the purpose of this check a glyph exists if the font slot is +% occupied---too bad if that contains the wrong glyph or some tofu. +% If it ``exists'' we return 0 otherwise 1. This way we can call +% this macro several times in a row and obtain a number that is 0 +% if all glyphs are existing or greater than 0 if any of them is +% missing. +% +% The second argument (holding the command name for a symbol) is +% not used during these tests. +% \begin{macrocode} +\def\doesglyphexist#1#2{\iffontchar\testFont #1 0\else 1\relax \fi} +% \end{macrocode} +% +% This macro also tests and outputs some information about the +% symbol if it is missing. This time we make use of the second +% argument. +% \begin{macrocode} +\def\glyphmissingdetails#1#2{\iffontchar\testFont #1 \else + \typeoutdetails{\space\space\space ==> \string#2 (#1) is missing}\fi} +% \end{macrocode} +% +% \begin{macrocode} +\newif\ifsafesubencodingfound +\newif\ifcoremisses +% \end{macrocode} +% +% Testing a group of symbols that belong to one sub-encoding. More +% precisely, the symbols that become unavailable if you change from +% sub-encoding $x$ (\texttt{\#2}) to $x+1$ (\texttt{\#3}). As far +% as the code is concerned, the +% symbols that are supposed to be always available (the core) +% become available if we test the group \texttt{-1} and \texttt{0}. +% +% The first argument contains the testing code and is supposed to +% return a single number greater or equal to zero. +% \begin{macrocode} +\def\testgroup#1#2#3{% + \ifnum 0 = #1% + \ifnum #2<0 + \typeoutdetails{All glyphs in core exist}% + \else + \typeoutdetails{All glyphs between sub-encoding #2 and #3 exist}% + \fi + \else + \ifnum #2<0 + \typeoutdetails{**********************************}% + \typeoutdetails{Some glyphs are missing from core:}% + \coremissestrue + \ifsafesubencodingfound \else + \def\subencodingresult{#2}% + \fi + \else + \typeoutdetails{Some glyphs are missing from sub-encoding #2:}% + \ifsafesubencodingfound \else + \def\subencodingresult{#3}% + \fi + \fi +% \end{macrocode} +% If some glyphs are missing, we rerun the test code but this time +% using \cs{glyphmissingdetails}. +% \begin{macrocode} + {\let\doesglyphexist \glyphmissingdetails #1}% +% \end{macrocode} +% And because we had misses we have definitely found the subset. +% \begin{macrocode} + \safesubencodingfoundtrue + \fi +} +% \end{macrocode} +% +% The currently defined subset for the family is either stored in +% \cs{TS1:\meta{family}} if it was declared, or it is the default +% subset which is stored in \cs{TS1:?}. +% \begin{macrocode} +\def\currsubencoding#1{\csname TS1:\ifcsname TS1:#1\endcsname #1\else ?\fi\endcsname} +% \end{macrocode} +% +% If a font family is not found when declaring it with +% \cs{DeclareFixedFont} we end up with the following font. This can +% then be used as a simple test if we failed loading the TS1 font. +% \begin{macrocode} +\DeclareFixedFont\cmrFont{TS1}{cmr}{m}{n}{10pt} +% \end{macrocode} +% +% Check for all glyphs in all encoding subsets \ldots +% \begin{macrocode} +\def\testallgroups#1{% + \DeclareFixedFont\testFont{TS1}{#1}{m}{n}{10pt}% + \ifx\testFont\cmrFont + \typeout{***** Font family #1 not found ****}% + \else +% \end{macrocode} +% We haven't checked anything yet. +% \begin{macrocode} + \safesubencodingfoundfalse + \coremissesfalse + \typeoutdetails{^^J-----------------------------------------}% + \typeoutdetails{Testing font family #1^^J(currently TS1-sub-encoding + \currsubencoding{#1})}% + \typeout{-----------------------------------------}% +% \end{macrocode} +% Then we start testing the groups beginning with the glyphs +% between sub-encoding 8 and 9. If any of them is missing (checked +% with \cs{doesglyphexist}) then we already know that 9 is the +% correct answer. +% \begin{macrocode} + \testgroup{% + \doesglyphexist{21}{\texttwelveudash}% + \doesglyphexist{22}{\textthreequartersemdash}% + \doesglyphexist{134}{\textbardbl}% + \doesglyphexist{137}{\textcelsius}% + \doesglyphexist{178}{\texttwosuperior}% + \doesglyphexist{179}{\textthreesuperior}% + \doesglyphexist{185}{\textonesuperior}% + }{8}{9}% +% \end{macrocode} +% Nevertheless we go on with further groups so that the output +% lists all missing glyphs. +% \begin{macrocode} + \testgroup{% + \doesglyphexist{32}{\textblank}% + \doesglyphexist{148}{\textinterrobang}% + \doesglyphexist{149}{\textinterrobangdown}% + \doesglyphexist{191}{\texteuro}% + }{7}{8}% + \testgroup{% + \doesglyphexist{47}{\textfractionsolidus}% + \doesglyphexist{61}{\textminus}% + \doesglyphexist{87}{\textohm}% + \doesglyphexist{181}{\textmu}% + }{6}{7}% + \testgroup{% + \doesglyphexist{140}{\textflorin}% + \doesglyphexist{164}{\textcurrency}% + }{5}{6}% + \testgroup{% + \doesglyphexist{155}{\textnumero}% + \doesglyphexist{157}{\textestimated}% + }{4}{5}% + \testgroup{% + \doesglyphexist{24}{\textleftarrow}% + \doesglyphexist{25}{\textrightarrow}% + \doesglyphexist{94}{\textuparrow}% + \doesglyphexist{95}{\textdownarrow}% + \doesglyphexist{141}{\textcolonmonetary}% + \doesglyphexist{142}{\textwon}% + \doesglyphexist{146}{\textlira}% + \doesglyphexist{150}{\textdong}% + }{3}{4}% + \testgroup{% + \doesglyphexist{60}{\textlangle}% + \doesglyphexist{62}{\textrangle}% + }{2}{3}% + \testgroup{% + \doesglyphexist{0}{\capitalgrave}% + \doesglyphexist{1}{\capitalacute}% + \doesglyphexist{2}{\capitalcircumflex}% + \doesglyphexist{3}{\capitaltilde}% + \doesglyphexist{4}{\capitaldieresis}% + \doesglyphexist{5}{\capitalhungarumlaut}% + \doesglyphexist{6}{\capitalring}% + \doesglyphexist{7}{\capitalcaron}% + \doesglyphexist{8}{\capitalbreve}% + \doesglyphexist{9}{\capitalmacron}% + \doesglyphexist{10}{\capitaldotaccent}% + \doesglyphexist{11}{\capitalcedilla}% + \doesglyphexist{12}{\capitalogonek}% + \doesglyphexist{26}{\t}% + \doesglyphexist{27}{\capitaltie}% + \doesglyphexist{28}{\newtie}% + \doesglyphexist{29}{\capitalnewtie}% + \doesglyphexist{45}{\textdblhyphen}% + \doesglyphexist{48}{\textzerooldstyle}% + \doesglyphexist{49}{\textoneoldstyle}% + \doesglyphexist{50}{\texttwooldstyle}% + \doesglyphexist{51}{\textthreeoldstyle}% + \doesglyphexist{52}{\textfouroldstyle}% + \doesglyphexist{53}{\textfiveoldstyle}% + \doesglyphexist{54}{\textsixoldstyle}% + \doesglyphexist{55}{\textsevenoldstyle}% + \doesglyphexist{56}{\texteightoldstyle}% + \doesglyphexist{57}{\textnineoldstyle}% + \doesglyphexist{77}{\textmho}% + \doesglyphexist{79}{\textbigcircle}% + \doesglyphexist{91}{\textlbrackdbl}% + \doesglyphexist{93}{\textrbrackdbl}% + \doesglyphexist{96}{\textasciigrave}% + \doesglyphexist{98}{\textborn}% + \doesglyphexist{99}{\textdivorced}% + \doesglyphexist{100}{\textdied}% + \doesglyphexist{108}{\textleaf}% + \doesglyphexist{109}{\textmarried}% + \doesglyphexist{110}{\textmusicalnote}% + \doesglyphexist{126}{\texttildelow}% + \doesglyphexist{127}{\textdblhyphenchar}% + \doesglyphexist{128}{\textasciibreve}% + \doesglyphexist{129}{\textasciicaron}% + \doesglyphexist{175}{\textasciimacron}% + \doesglyphexist{130}{\textacutedbl}% + \doesglyphexist{131}{\textgravedbl}% + \doesglyphexist{138}{\textdollaroldstyle}% + \doesglyphexist{139}{\textcentoldstyle}% + \doesglyphexist{143}{\textnaira}% + \doesglyphexist{144}{\textguarani}% + \doesglyphexist{145}{\textpeso}% + \doesglyphexist{147}{\textrecipe}% + \doesglyphexist{152}{\textpertenthousand}% + \doesglyphexist{153}{\textpilcrow}% + \doesglyphexist{154}{\textbaht}% + \doesglyphexist{156}{\textdiscount}% + \doesglyphexist{158}{\textopenbullet}% + \doesglyphexist{159}{\textservicemark}% + \doesglyphexist{160}{\textlquill}% + \doesglyphexist{161}{\textrquill}% + \doesglyphexist{168}{\textasciidieresis}% + \doesglyphexist{171}{\textcopyleft}% + \doesglyphexist{173}{\textcircledP}% + \doesglyphexist{180}{\textasciiacute}% + \doesglyphexist{184}{\textreferencemark}% + \doesglyphexist{187}{\textsurd}% + }{1}{2}% +% \end{macrocode} +% All fonts (up to now) that belong to sub-encoding 1 do have the +% \cs{textcircled} glyph, but it is too small to be usable. So this +% test for this group currently doesn't do much good---but who +% knows maybe one day a font shows up in which this glyph is +% actually missing. +% \begin{macrocode} + \testgroup{% + \doesglyphexist{79}{\textcircled}% this is not a proper test because the symbol is + % usually available but not usable + }{0}{1}% + \testgroup{% + \doesglyphexist{13}{\textquotestraightbase}% + \doesglyphexist{18}{\textquotestraightdblbase}% + \doesglyphexist{23}{\textcapitalcompwordmark}% + \doesglyphexist{31}{\textascendercompwordmark}% + \doesglyphexist{36}{\textdollar}% + \doesglyphexist{39}{\textquotesingle}% + \doesglyphexist{42}{\textasteriskcentered}% + \doesglyphexist{132}{\textdagger}% + \doesglyphexist{133}{\textdaggerdbl}% + \doesglyphexist{135}{\textperthousand}% + \doesglyphexist{136}{\textbullet}% + \doesglyphexist{151}{\texttrademark}% + \doesglyphexist{162}{\textcent}% + \doesglyphexist{163}{\textsterling}% + \doesglyphexist{165}{\textyen}% + \doesglyphexist{166}{\textbrokenbar}% + \doesglyphexist{167}{\textsection}% + \doesglyphexist{169}{\textcopyright}% + \doesglyphexist{170}{\textordfeminine}% + \doesglyphexist{172}{\textlnot}% + \doesglyphexist{174}{\textregistered}% + \doesglyphexist{176}{\textdegree}% + \doesglyphexist{177}{\textpm}% + \doesglyphexist{182}{\textparagraph}% + \doesglyphexist{183}{\textperiodcentered}% + \doesglyphexist{186}{\textordmasculine}% + \doesglyphexist{188}{\textonequarter}% + \doesglyphexist{189}{\textonehalf}% + \doesglyphexist{190}{\textthreequarters}% + \doesglyphexist{214}{\texttimes}% + \doesglyphexist{246}{\textdiv}% + }{-1}{0}% +% \end{macrocode} +% If all groups have all glyphs then we have the full encoding +% (subset 0). +% \begin{macrocode} + \ifsafesubencodingfound\else + \def\subencodingresult{0}% + \fi +% \end{macrocode} +% If the font is missing some of the core glyphs we make a remark +% about this, because they will never display. +% \begin{macrocode} + \typeoutdetails{-----------------------------------------}% + \typeout{TS1 encoding subset for #1\ifcoremisses \space(ignoring core misses)\fi + \space (\ifnum\subencodingresult = + \currsubencoding{#1} ok\else bad\fi)}% + \typeout{Use sub-encoding \subencodingresult + \ifnum\subencodingresult = \currsubencoding{#1}\else + \space (not \currsubencoding{#1})\fi} + \typeout{-----------------------------------------^^J}% + \fi +} +% \end{macrocode} +% +% This tests all declarations (or most of them) that have been +% added to the kernel. It is called if no family is given interactively. +% \begin{macrocode} +\long\def\testallkerneldefinedfamilies{% +\testallgroups{ccr}% {0} +\testallgroups{cmbr}% {0} +%%\testallgroups{cmr}% {0} % don't test this one as it is the fallback + % thus reports that the family is not found +\testallgroups{cmss}% {0} +\testallgroups{cmtl}% {0} +\testallgroups{cmtt}% {0} +\testallgroups{cmvtt}% {0} +\testallgroups{pxr}% {0} +\testallgroups{pxss}% {0} +\testallgroups{pxtt}% {0} +\testallgroups{qag}% {0} +\testallgroups{qbk}% {0} +\testallgroups{qcr}% {0} +\testallgroups{qcs}% {0} +\testallgroups{qhvc}% {0} +\testallgroups{qhv}% {0} +\testallgroups{qpl}% {0} +\testallgroups{qtm}% {0} +\testallgroups{qzc}% {0} +\testallgroups{txr}% {0} +\testallgroups{txss}% {0} +\testallgroups{txtt}% {0} +% +% Next would claim to be 0 (or 2) +% +%\testallgroups{lmr}% {1} +%\testallgroups{lmdh}% {1} +%\testallgroups{lmss}% {1} +%\testallgroups{lmssq}% {1} +%\testallgroups{lmvtt}% {1} +%\testallgroups{lmtt}% {1} % missing TM, SM and pertenthousand so really 2 +% +% these are no longer in TeX Live +% +%\testallgroups{ptmx}% {2} % gone for a long time it seems +%\testallgroups{ptmj}% {2} % ditto +%\testallgroups{ul8}% {2} % ditto +% +% next block has tofu chars so results are wrong +% +%\testallgroups{bch}% {5} % tofu for blank, ohm +%\testallgroups{futj}%{5} % tofu for blank, interrobang/down, ohm +%\testallgroups{futs}%{5} % tofu for blank, ohm +%\testallgroups{futx}%{5} % probably (currently broken distrib) +%\testallgroups{pag}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{pbk}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{pcr}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{phv}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{pnc}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{pplj}%{5} % tofu for blank +%\testallgroups{pplx}%{5} % tofu for blank +%\testallgroups{ppl}% {5} % tofu for blank interrobang/down +%\testallgroups{ptm}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{pzc}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{ul9}% {5} % tofu for blank, interrobang/down, ohm +%\testallgroups{dayroms}%{6} % tofu for blank, interrobang/down, ohm +%\testallgroups{dayrom}% {6} % tofu for blank, interrobang/down, ohm +%\testallgroups{augie}%{8} % really only missing euro and full of tofu +%\testallgroups{put}% {8} +%\testallgroups{uag}% {8} % probably (currently broken distrib) +%\testallgroups{ugq}% {8} +% +\testallgroups{zi4}% {9} +% +%% not installed normally +% +%\testallgroups{hls}% {5} +%\testallgroups{hlst}% {5} +%\testallgroups{hlct}% {5} +%\testallgroups{hlh}% {5} +%\testallgroups{hlx}% {8} +%\testallgroups{hlce}% {8} +%\testallgroups{hlcn}% {8} +%\testallgroups{hlcw}% {8} +%\testallgroups{hlcf}% {8} - +\testallgroups{lato-LF}% {0} % with a bunch of tofu inside --- should probably be changed +\testallgroups{opensans-TLF}%{0} % with a bunch of tofu inside --- should probably be changed +\testallgroups{cantarell-TLF}% {0} % with a bunch of tofu inside --- should probably be changed +\testallgroups{fbb-LF}% {0} % missing centoldstyle ---> 2 +\testallgroups{tli}% {1} % with lots of tofu inside --- should probably be changed +\testallgroups{Alegreya-OsF}% {2} +\testallgroups{AlegreyaSans-OsF}% {2} +\testallgroups{DejaVuSans-TLF}% {2} +\testallgroups{DejaVuSansCondensed-TLF}% {2} +\testallgroups{DejaVuSansMono-TLF}% {2} this is missing \textfractionsolidus which makes it 7 really +\testallgroups{EBGaramond-LF}% {2} +\testallgroups{Tempora-TLF}% {2} +\testallgroups{Tempora-TOsF}% {2} +\testallgroups{Arimo-TLF}% {3} +\testallgroups{Crlt-TLF}% {3} changed from Carlito- +\testallgroups{FiraSans-LF}% {3} should be 4 +\testallgroups{IBMPlexSans-TLF}% {3} +\testallgroups{Merriwthr-OsF}% {3} changed from Merriweather- and should be 2 +\testallgroups{Montserrat-LF}% {3} now 2 +\testallgroups{MontserratAlternates-LF}%{3} now 2 +\testallgroups{SourceCodePro-TLF}% {3} +\testallgroups{SourceCodePro-TOsF}% {3} +\testallgroups{SourceSansPro-OsF}% {3} +\testallgroups{SourceSerifPro-LF}% {3} +\testallgroups{Tinos-TLF}% {3} +\testallgroups{AccanthisADFStdNoThree-LF}%{4} +\testallgroups{Cabin-TLF}% {4} +\testallgroups{Caladea-TLF}% {4} +\testallgroups{Chivo-LF}% {4} +\testallgroups{ClearSans-TLF}% {4} +\testallgroups{Coelacanth-LF}% {4} +\testallgroups{CrimsonPro-LF}% {4} +\testallgroups{FiraMono-TLF}% {4} +\testallgroups{FiraMono-TOsF}% {4} +\testallgroups{Go-TLF}% {4} +\testallgroups{GoMono-TLF}% {4} +\testallgroups{InriaSans-LF}% {4} +\testallgroups{InriaSerif-LF}% {4} +\testallgroups{LibertinusSans-LF}% {4} +\testallgroups{LibertinusSerif-LF}% {4} +\testallgroups{LibreBodoni-TLF}% {4} +\testallgroups{LibreFranklin-TLF}% {4} +\testallgroups{LinguisticsPro-LF}% {4} +\testallgroups{LinguisticsPro-OsF}% {4} +\testallgroups{LinuxBiolinumT-LF}% {4} +\testallgroups{LinuxLibertineT-LF}% {4} +\testallgroups{MerriwthrSans-OsF}% {4} name change and now 2 +\testallgroups{MintSpirit-LF}% {4} +\testallgroups{MintSpiritNoTwo-LF}% {4} +\testallgroups{PTMono-TLF}% {4} +\testallgroups{PTSans-TLF}% {4} +\testallgroups{PTSansCaption-TLF}% {4} +\testallgroups{PTSansNarrow-TLF}% {4} +\testallgroups{PTSerif-TLF}% {4} +\testallgroups{PTSerifCaption-TLF}% {4} +\testallgroups{Raleway-TLF}% {4} +\testallgroups{Raleway-TOsF}% {4} +\testallgroups{Roboto-LF}% {4} +\testallgroups{RobotoMono-TLF}% {4} +\testallgroups{RobotoSlab-TLF}% {4} +\testallgroups{Rosario-LF}% {4} +\testallgroups{SticksTooText-LF}% {4} +\testallgroups{UniversalisADFStd-LF}%{4} +\testallgroups{Almndr-OsF}% {5} name change +\testallgroups{Baskervaldx-LF}% {5} +\testallgroups{BaskervilleF-LF}% {5} now 2 +\testallgroups{Bttr-TLF}% {5} name changed from Bitter-... +\testallgroups{Cinzel-LF}% {5} +\testallgroups{CinzelDecorative-LF}%{5} +\testallgroups{DejaVuSerif-TLF}% {5} +\testallgroups{DejaVuSerifCondensed-TLF}% {5} +\testallgroups{GilliusADF-LF}% {5} +\testallgroups{charssil-TLF} %% missing should be 5 +\testallgroups{GilliusADFCond-LF}%{5} +\testallgroups{GilliusADFNoTwo-LF}%{5} +\testallgroups{GilliusADFNoTwoCond-LF}%{5} +\testallgroups{Lbstr-LF}% {5} name change and should be 7 +\testallgroups{OldStandard-TLF}% {5} +\testallgroups{PlyfrDisplay-LF}%{5} name change +\testallgroups{PlyfrDisplay-OsF}% {5} name change +\testallgroups{TheanoDidot-TLF}% {5} +\testallgroups{TheanoDidot-TOsF}% {5} +\testallgroups{TheanoModern-TLF}% {5} +\testallgroups{TheanoModern-TOsF}%{5} +\testallgroups{TheanoOldStyle-TLF}%{5} +\testallgroups{TheanoOldStyle-TOsF}%{5} +\testallgroups{Crimson-TLF}% {6} +\testallgroups{IBMPlexMono-TLF}% {6} now 3 +\testallgroups{IBMPlexSerif-TLF}% {6} now 3 +\testallgroups{LibertinusMono-TLF}%{6} should be 8 +\testallgroups{LibertinusSerifDisplay-LF}%{6} +\testallgroups{LinuxLibertineDisplayT-LF}%{6} +\testallgroups{LinuxLibertineMonoT-LF}%{6} +\testallgroups{LinuxLibertineMonoT-TLF}%{6} +\testallgroups{Ovrlck-LF}% {6} name changed +\testallgroups{CormorantGaramond-LF}%{7} +\testallgroups{Heuristica-TLF}% {7} +\testallgroups{Heuristica-TOsF}% {7} +\testallgroups{IMFELLEnglish-TLF}%{7} +\testallgroups{LibreBskvl-LF}% {7} %% wrong name LibreBaskerville-TLF +\testallgroups{LibreCsln-LF}% {7} changed from LibreCaslon- +\testallgroups{Mrcls-LF}% {7} %% wrong name Marcellus-LF +\testallgroups{NotoSans-LF}% {7} +\testallgroups{NotoSansMono-TLF}%{7} now 2 +\testallgroups{NotoSansMono-TOsF}%{7} now 2 +\testallgroups{NotoSerif-LF}% {7} +\testallgroups{Quattro-LF}% {7} changed from Quattrocento- +\testallgroups{QuattroSans-LF}% {7} changed from QuattrocentoSans- +\testallgroups{XCharter-TLF}% {7} now 2 +\testallgroups{XCharter-TOsF}% {7} now 2 +\testallgroups{erewhon-LF}% {7} now 2 +\testallgroups{ComicNeue-TLF}% {7} +\testallgroups{ComicNeueAngular-TLF}%{7} +\testallgroups{Frm-LF}%{7} % the superiors are missing; name changed from Forum-LF +\testallgroups{Cochineal-TLF}% {8} now 5 +\testallgroups{AlgolRevived-TLF}%{9} +} +% \end{macrocode} +% +% There interaction with the user. +% \begin{macrocode} +\typeout{^^J=====================================================================} +\typeout{| Enter font family to check (or <enter> for kernel defined families)} +\typeout{=====================================================================} +\typein[\FontFamilyToCheck]{} +% \end{macrocode} +% +% \begin{macrocode} +\if!\FontFamilyToCheck! + \typeout{=====================================================================} + \typeout{| Detailed output? (default no)} + \typeout{=====================================================================} + \typein[\Details]{} + \if!\Details! + \def\typeoutdetails#1{} + \else + \let\typeoutdetails\typeout + \fi + \testallkerneldefinedfamilies +\else + \let\typeoutdetails\typeout + \testallgroups\FontFamilyToCheck +\fi +% \end{macrocode} +% +% \begin{macrocode} +\stop +%</TS1check> +% \end{macrocode} +% % \Finale % |