summaryrefslogtreecommitdiff
path: root/tex/context/base/typo-spa.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/typo-spa.mkiv')
-rw-r--r--tex/context/base/typo-spa.mkiv14
1 files changed, 8 insertions, 6 deletions
diff --git a/tex/context/base/typo-spa.mkiv b/tex/context/base/typo-spa.mkiv
index e059b62e4..c877fdf67 100644
--- a/tex/context/base/typo-spa.mkiv
+++ b/tex/context/base/typo-spa.mkiv
@@ -38,20 +38,22 @@
{\ifcsname\??ch:#1\endcsname
\begingroup % for the moment we use modes, in ordere to avoid interface translation
\getparameters[\??ch][\c!left=0,\c!right=0,\c!alternative=0,#3]%
- \ctxlua{spacings.setspacing(\getvalue{\??ch:#1},\number#2,\@@chleft,\@@chright,\@@chalternative)}%
+ \ctxlua{typesetting.spacings.setup(\getvalue{\??ch:#1},\number#2,\@@chleft,\@@chright,\@@chalternative)}%
\endgroup
\fi}
-\def\setcharacterspacing
- {\ctxlua{spacings.enable()}%
- \gdef\setcharacterspacing[##1]{\attribute\spacingattribute\csname\??ch:##1\endcsname\relax}%
- \setcharacterspacing}
+\unexpanded\def\setcharacterspacing[#1]%
+ {\ctxlua{typesetting.spacings.set(\number\csname\??ch:#1\endcsname)}}
-\def\resetcharacterspacing
+\unexpanded\def\resetcharacterspacing % fast one
{\attribute\spacingattribute\attributeunsetvalue}
\letvalue{\??ch:\s!reset}\attributeunsetvalue
+\appendtoks
+ \resetcharacterspacing
+\to \everyresettypesetting
+
% \setcharacterspacing[frenchpunctuation]
% «\type{bla}»\crlf « \type{bla}»\crlf
% «bla »\crlf « bla»\crlf « bla »\crlf