summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/font-sel.mklx
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/font-sel.mklx')
-rw-r--r--tex/context/base/mkxl/font-sel.mklx18
1 files changed, 11 insertions, 7 deletions
diff --git a/tex/context/base/mkxl/font-sel.mklx b/tex/context/base/mkxl/font-sel.mklx
index 6c9ab3d7e..be9215704 100644
--- a/tex/context/base/mkxl/font-sel.mklx
+++ b/tex/context/base/mkxl/font-sel.mklx
@@ -58,7 +58,7 @@
\installcorenamespace {selectfontpreset}
\permanent\tolerant\protected\def\definefontfamilypreset[#name]#spacer[#settings]%
- {\setvalue{\??selectfontpreset#name}{\setupcurrentselectfont[#settings]}%
+ {\defcsname\??selectfontpreset#name\endcsname{\setupcurrentselectfont[#settings]}%
\clf_definefontfamilypreset{#name}{\luaexpanded{#settings}}}
\def\selectfont_preset_process#name%
@@ -247,15 +247,19 @@
% tf = … | * … | name:… | name:* … | file:… | file:* … | style:medium
\permanent\tolerant\protected\def\definefontfamily[#typeface]#spacer[#style]#spacer[#family]#spacer[#settings]%
- {\doifelseassignment{#settings}
- {\selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},#settings]}
- {\selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},\c!preset={#settings}]}%
+ {\ifhastok={#settings}%
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},#settings]%
+ \else
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},\c!preset={#settings}]%
+ \fi
\clf_definefontfamily\selectfont_index\relax}
\permanent\tolerant\def\definefallbackfamily[#typeface]#spacer[#style]#spacer[#family]#spacer[#settings]%
- {\doifelseassignment{#settings}
- {\selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},#settings]}
- {\selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},\c!preset={#settings}]}%
+ {\ifhastok={#settings}%
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},#settings]%
+ \else
+ \selectfont_register[#style][\c!label={#typeface},\c!style={#style},\c!name={#family},\c!preset={#settings}]%
+ \fi
\clf_definefallbackfamily\selectfont_index\relax}
\permanent\tolerant\protected\def\setupfontfamily[#style]#spacer[#settings]%