summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t-letterspace.mkiv10
1 files changed, 10 insertions, 0 deletions
diff --git a/t-letterspace.mkiv b/t-letterspace.mkiv
index 7ef824f..509e4aa 100644
--- a/t-letterspace.mkiv
+++ b/t-letterspace.mkiv
@@ -21,6 +21,7 @@
\setinterfacevariable {letterspace} {letterspace}
\setinterfacevariable {spacefactor} {spacefactor}
\setinterfacevariable {spaceskip} {spaceskip}
+ \setinterfacevariable {suppresskern}{suppresskern}
\stopinterface
\unprotect
@@ -66,6 +67,9 @@
\dododoletterspace%
}
+\definefontfeature [letterspace:kerning] [kern=yes]
+\def\letterspace_truevalues{true,yep,yes}
+
\def\dododoletterspace#1{%
\def\currentobject{#1}%
\dontleavehmode
@@ -74,6 +78,11 @@
\setcharacterkerning[letterspace:current]%
\advance \spaceskip \letterspaceparameter{spaceskip}%
\advance \xspaceskip \letterspaceparameter{spaceskip}%
+ \doifinset{\letterspaceparameter{suppresskern}}{\letterspace_truevalues}{%
+ %\addfontfeaturetofont{letterspace:nokern}%
+ %\setff{letterspace:nokern}%
+ \subtractfontfeaturefromfont{letterspace:kerning}%
+ }
}%
\ifhmode\ifnum\lastnodetype=\@@gluenode
\unskip{\letterspace_setstuff\ }%
@@ -149,6 +158,7 @@
\setupletterspace [
\v!spacefactor=.125,
\v!spaceskip=.5em,
+ \v!suppresskern=false,
]
\defineletterspace[\v!letterspace]