diff options
Diffstat (limited to 'tex/context/base/font-fea.mkvi')
-rw-r--r-- | tex/context/base/font-fea.mkvi | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tex/context/base/font-fea.mkvi b/tex/context/base/font-fea.mkvi index 969e95575..208b1b8db 100644 --- a/tex/context/base/font-fea.mkvi +++ b/tex/context/base/font-fea.mkvi @@ -166,6 +166,36 @@ \let\addff\addfontfeaturetofont \let\subff\subtractfontfeaturefromfont +% beware: these are global features on top of existing font features + +\let\currentfeature\s!current + +% \installcorenamespace{fontfeature} +% +% \setvalue{\??fontfeature\currentfeature}{} +% +% \unexpanded\def\feature#1% +% {\ifcsname\??fontfeature\fontid\font+\currentfeature+#1\endcsname \else +% \font_feature{#1}% +% \fi +% \attribute\zerocount\csname\??fontfeature\fontid\font+\currentfeature+#1\endcsname\relax +% \edef\currentfeature{\currentfeature+#1}} +% +% \unexpanded\def\font_feature#1% +% {\expandafter\xdef\csname\??fontfeature\fontid\font+\currentfeature+#1\endcsname{\ctxcommand{feature("\currentfeature+#1","#1",\number\fontid\font)}}} +% +% faster: +% +% \unexpanded\def\feature#1% +% {\attribute\zerocount\ctxcommand{feature("\currentfeature+#1","#1")}\relax +% \edef\currentfeature{\currentfeature+#1}} +% +% similar, less code: + +\unexpanded\def\feature#1% + {\ctxcommand{feature("\currentfeature+#1","#1")}% + \edef\currentfeature{\currentfeature+#1}} + %D \macros %D {os} %D |