diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-09-18 21:00:53 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-09-18 21:00:53 +0200 |
commit | 1970df23942ba9c944ea62ff51012f4e46a32974 (patch) | |
tree | 9ab77bdd4a58619f514823a574f30aca291afc58 /tex/context/base/mkiv/font-fil.mklx | |
parent | e7dc9c1fc474fa15a2cbc34d8f543518f5853361 (diff) | |
download | context-1970df23942ba9c944ea62ff51012f4e46a32974.tar.gz |
2020-09-18 20:31:00
Diffstat (limited to 'tex/context/base/mkiv/font-fil.mklx')
-rw-r--r-- | tex/context/base/mkiv/font-fil.mklx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tex/context/base/mkiv/font-fil.mklx b/tex/context/base/mkiv/font-fil.mklx index 65cd64428..3bc5d8c26 100644 --- a/tex/context/base/mkiv/font-fil.mklx +++ b/tex/context/base/mkiv/font-fil.mklx @@ -235,24 +235,26 @@ % todo: replace * by ... less messy with features +% % no \ifempty here as #1 can be empty +% % \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 -% \ifempty#first% +% \ifx#first\empty % \expandafter\truefontname\lastnamedcs % \else % \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% % \fi % \orelse\ifcsname\??fontfile\defaultfontclass#name\endcsname -% \ifempty#first% +% \ifx#first\empty % \expandafter\truefontname\lastnamedcs % \else % \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% % \fi % \orelse\ifcsname\??fontfile#name\endcsname -% \ifempty#first% +% \ifx#first\empty % \expandafter\truefontname\lastnamedcs % \else % \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% @@ -275,30 +277,32 @@ % #name% % \fi} +% no \ifempty here as #1 can be empty + \def\truefontname#name% {\expandafter\font_helpers_true_fontname#name*\empty*\relax} \def\font_helpers_true_fontname#name*#first#rest*#ignore\relax {\ifcsname\??fontfile\fontclass#name\endcsname - \ifempty#first% + \ifx#first\empty \expandafter\truefontname\lastnamedcs \else \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% \fi \orelse\ifcsname\??fontfile\defaultfontclass#name\endcsname - \ifempty#first% + \ifx#first\empty \expandafter\truefontname\lastnamedcs \else \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% \fi \orelse\ifcsname\??fontfile#name\endcsname - \ifempty#first% + \ifx#first\empty \expandafter\truefontname\lastnamedcs \else \expandafter\font_helpers_true_fontname_check\lastnamedcs*#first#rest% \fi \else - #name\ifempty#first\else*#first#rest\fi + #name\ifx#first\empty\else*#first#rest\fi \fi} \def\font_helpers_true_fontname_check#name% |