diff options
author | Marius <mariausol@gmail.com> | 2011-02-05 13:00:11 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-02-05 13:00:11 +0200 |
commit | 801c806a2489c5c96578fe95945bef589329c4e0 (patch) | |
tree | 7f1a623e5ed3cd68bc5105a7b9d4d4ff918682c3 /tex/context/base/font-run.mkiv | |
parent | bb66aa068077405ae304ab6defc770b2b3222b9f (diff) | |
download | context-801c806a2489c5c96578fe95945bef589329c4e0.tar.gz |
beta 2011.02.05 11:37
Diffstat (limited to 'tex/context/base/font-run.mkiv')
-rw-r--r-- | tex/context/base/font-run.mkiv | 76 |
1 files changed, 50 insertions, 26 deletions
diff --git a/tex/context/base/font-run.mkiv b/tex/context/base/font-run.mkiv index 8b3002c0b..f65017ef4 100644 --- a/tex/context/base/font-run.mkiv +++ b/tex/context/base/font-run.mkiv @@ -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}}} |