diff options
Diffstat (limited to 'tex/context/base/mkiv/font-fil.mkvi')
-rw-r--r-- | tex/context/base/mkiv/font-fil.mkvi | 97 |
1 files changed, 56 insertions, 41 deletions
diff --git a/tex/context/base/mkiv/font-fil.mkvi b/tex/context/base/mkiv/font-fil.mkvi index 0bfc07b6c..26751531b 100644 --- a/tex/context/base/mkiv/font-fil.mkvi +++ b/tex/context/base/mkiv/font-fil.mkvi @@ -185,53 +185,68 @@ % todo: replace * by ... less messy with features -\def\truefontname#name% - {\expandafter\font_helpers_true_fontname#name*\empty*\relax} - -\def\font_helpers_true_fontname#name*#first#rest*#crap\relax - {\ifcsname\??fontfile\fontclass#name\endcsname - \ifx#first\empty - %\expandafter\truefontname\csname\??fontfile\fontclass#name\endcsname - \expandafter\truefontname\lastnamedcs - \else - %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname*#first#rest% - \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% - \fi - \else\ifcsname\??fontfile\defaultfontclass#name\endcsname - \ifx#first\empty - %\expandafter\truefontname\csname\??fontfile\defaultfontclass#name\endcsname - \expandafter\truefontname\lastnamedcs - \else - %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname*#first#rest% - \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% - \fi - \else\ifcsname\??fontfile#name\endcsname - \ifx#first\empty - %\expandafter\truefontname\csname\??fontfile#name\endcsname - \expandafter\truefontname\lastnamedcs - \else - %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname*#first#rest% - \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% - \fi - \else - #name\ifx#first\empty\else*#first#rest\fi - \fi\fi\fi} +% \def\truefontname#name% +% {\expandafter\font_helpers_true_fontname#name*\empty*\relax} +% +% \def\font_helpers_true_fontname#name*#first#rest*#crap\relax +% {\ifcsname\??fontfile\fontclass#name\endcsname +% \ifx#first\empty +% %\expandafter\truefontname\csname\??fontfile\fontclass#name\endcsname +% \expandafter\truefontname\lastnamedcs +% \else +% %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname*#first#rest% +% \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% +% \fi +% \else\ifcsname\??fontfile\defaultfontclass#name\endcsname +% \ifx#first\empty +% %\expandafter\truefontname\csname\??fontfile\defaultfontclass#name\endcsname +% \expandafter\truefontname\lastnamedcs +% \else +% %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname*#first#rest% +% \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% +% \fi +% \else\ifcsname\??fontfile#name\endcsname +% \ifx#first\empty +% %\expandafter\truefontname\csname\??fontfile#name\endcsname +% \expandafter\truefontname\lastnamedcs +% \else +% %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname*#first#rest% +% \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% +% \fi +% \else +% #name\ifx#first\empty\else*#first#rest\fi +% \fi\fi\fi} +% +% \def\font_helpers_true_fontname_check#name% +% {\expandafter\font_helpers_true_fontname_check_indeed#name*\relax} +% +% \def\font_helpers_true_fontname_check_indeed#name*#crap\relax +% {\ifcsname\??fontfile\fontclass#name\endcsname +% %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname +% \expandafter\font_helpers_true_fontname_check\lastnamedcs +% \else\ifcsname\??fontfile\defaultfontclass#name\endcsname +% %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname +% \expandafter\font_helpers_true_fontname_check\lastnamedcs +% \else\ifcsname\??fontfile#name\endcsname +% %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname +% \expandafter\font_helpers_true_fontname_check\lastnamedcs +% \else +% #name% +% \fi\fi\fi} -\def\font_helpers_true_fontname_check#name% - {\expandafter\font_helpers_true_fontname_check_indeed#name*\relax} +\def\truefontname#name% + %{\normalexpanded{\noexpand\font_helpers_true_fontname{\clf_truefontname{#name}}}} + {\expandafter\expandafter\expandafter\font_helpers_true_fontname\expandafter\expandafter\expandafter{\clf_truefontname{#name}}} -\def\font_helpers_true_fontname_check_indeed#name*#crap\relax +\def\font_helpers_true_fontname#name% {\ifcsname\??fontfile\fontclass#name\endcsname - %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\fontclass#name\endcsname - \expandafter\font_helpers_true_fontname_check\lastnamedcs + \expandafter\font_helpers_true_fontname\expandafter{\lastnamedcs}% \else\ifcsname\??fontfile\defaultfontclass#name\endcsname - %\expandafter\font_helpers_true_fontname_check\csname\??fontfile\defaultfontclass#name\endcsname - \expandafter\font_helpers_true_fontname_check\lastnamedcs + \expandafter\font_helpers_true_fontname\expandafter{\lastnamedcs}% \else\ifcsname\??fontfile#name\endcsname - %\expandafter\font_helpers_true_fontname_check\csname\??fontfile#name\endcsname - \expandafter\font_helpers_true_fontname_check\lastnamedcs + \expandafter\font_helpers_true_fontname\expandafter{\lastnamedcs}% \else - #name% + \clf_truefontname{#name}% \fi\fi\fi} \def\expandfontsynonym#command#name% one level expansion |