diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/font-run.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/font-run.mkiv | 94 |
1 files changed, 64 insertions, 30 deletions
diff --git a/Master/texmf-dist/tex/context/base/font-run.mkiv b/Master/texmf-dist/tex/context/base/font-run.mkiv index aad6bebe88e..7a6764ac8a0 100644 --- a/Master/texmf-dist/tex/context/base/font-run.mkiv +++ b/Master/texmf-dist/tex/context/base/font-run.mkiv @@ -140,7 +140,7 @@ \ifinsidefloat\else\startbaselinecorrection\fi \vbox\bgroup \forgetall - \startoverlay + \startoverlay % easier in cld {\vbox {\tf \setstrut \dummy \offinterlineskip @@ -203,33 +203,57 @@ \ifinsidefloat\else\stopbaselinecorrection\fi \egroup} -\gdef\showfontstyle - {\dotripleempty\doshowfontstyle} +% \showfontstyle[modern][rm][tf][all] % #2, #3 and #4 can be 'all' -\gdef\doshowfontstyle[#1][#2][#3]% - {\ifthirdargument - \bgroup - \raggedright - \switchtobodyfont[#1] - \def\dodocommand##1##2% - {\starttextrule{\tttf #1 ##1 ##2} - \nobreak \getvalue{##2}% - \dorecurse{255} - {\iffontchar\font\recurselevel\relax - \char\recurselevel\relax\space - \fi} - \par \nobreak - \stoptextrule} - \def\docommand##1% - {\getvalue{##1}\processcommacommand[#3]{\dodocommand{##1}}} - \processcommalist[#2]\docommand - \egroup - \else\ifsecondargument - \showfontstyle[#1][#2][\fontalternativelist]% math is gone - \else - \showfontstyle[#1][\c!rm]\showfontstyle[#1][\c!ss] - \showfontstyle[#1][\c!tt]\showfontstyle[#1][\c!mm] - \fi\fi} +\gdef\showfontstyle {\dodoubleempty \dodoshowfontstyle} +\gdef\redoshowfontstyle {\dotripleempty \dododoshowfontstyle} +\gdef\redodoshowfontstyle{\doquadrupleempty\dodododoshowfontstyle} + +\gdef\dodoshowfontstyle[#1][#2]% + {\doifelse{#2}\v!all + {\dodoshowfontstyle[#1][\c!rm,\c!ss,\c!tt,\c!mm]} + {\doifelsenothing{#2} + {\redoshowfontstyle[#1][\c!rm,\c!ss,\c!tt,\c!mm]} + {\redoshowfontstyle[#1][#2]}}} + +\gdef\dododoshowfontstyle[#1][#2][#3]% + {\doifelse{#3}\v!all + {\redodoshowfontstyle[#1][#2][\fontalternativelist]} + {\doifelsenothing{#3} + {\redodoshowfontstyle[#1][#2][\fontalternativelist]} + {\redodoshowfontstyle[#1][#2][#3]}}} + +\gdef\dodododoshowfontstyle[#1][#2][#3][#4]% + {\doifelsenothing{#4} + {\doshowfontstyleindeed[#1][#2][#3][\v!all]} + {\doshowfontstyleindeed[#1][#2][#3][#4]}} + +\gdef\doshowfontstyleindeed[#1][#2][#3][#4]% + {\bgroup + \raggedright + \switchtobodyfont[#1] + \def\dododocommand##1% + {\dostepwiserecurse{0}{255}{1} + {\scratchcounter\numexpr##1*256+\recurselevel\relax + \iffontchar\font\scratchcounter\relax + \char\scratchcounter + \space + \fi}}% + \def\dodocommand##1##2% + {\starttextrule{\tttf #1 ##1 ##2} + \nobreak\getvalue{##2}% + \doifelsenothing{#4} + {\dododocommand{0}} + {\doifelse{#4}\v!all + {\dostepwiserecurse{0}{255}{1}{\expanded{\dododocommand{\recurselevel}}}} + {\processcommalist[#4]{\dododocommand}}}% + \par \nobreak + \stoptextrule} + \def\docommand##1% + {\getvalue{##1}% + \processcommacommand[#3]{\dodocommand{##1}}} + \processcommalist[#2]\docommand + \egroup} \gdef\showligature#1% {\hbox{\type{#1}\enspace\red\ruledhbox{\black#1}}} @@ -316,7 +340,7 @@ \starttabulate[||T|T|T|T|T|T|T|T|T|] \testminimalbaseline{\hbox to 1em{\hss\showstruts\strut\hss}}% \testminimalbaseline{(/)}% - \testminimalbaseline{$\frac{1}{2}x^2_3$} + \testminimalbaseline{$\frac{1}{2}x\normalsuperscript2\normalsubscript3$} \stoptabulate \fi} @@ -330,8 +354,18 @@ \gdef\showcharratio {\dowithnextboxcontent {\switchtobodyfont[10pt]}% - {(\expanded{\withoutpt\the\nextboxht},% - \expanded{\withoutpt\the\nextboxdp})}% + {(\withoutpt\the\nextboxht,\withoutpt\the\nextboxdp)}% \hbox} +\gdef\showfontparameters + {\starttabulate[|tl|l|] + \NC slantperpoint \NC \the\fontslantperpoint \font \NC\NR + \NC interwordspace \NC \the\fontinterwordspace \font \NC\NR + \NC interwordstretch\NC \the\fontinterwordstretch\font \NC\NR + \NC interwordshrink \NC \the\fontinterwordshrink \font \NC\NR + \NC exheight \NC \the\fontexheight \font \NC\NR + \NC emwidth \NC \the\fontemwidth \font \NC\NR + \NC extraspace \NC \the\fontextraspace \font \NC\NR + \stoptabulate} + \protect \endinput |