From 0a5f59a9aa25b3de7e9659b39ad201aaf7eb5a67 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 27 Sep 2019 20:24:34 +0200 Subject: 2019-09-27 18:10:00 --- .../2017/context-2017-features-spacetest.tex | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 doc/context/presentations/context/2017/context-2017-features-spacetest.tex (limited to 'doc/context/presentations/context/2017/context-2017-features-spacetest.tex') diff --git a/doc/context/presentations/context/2017/context-2017-features-spacetest.tex b/doc/context/presentations/context/2017/context-2017-features-spacetest.tex new file mode 100644 index 000000000..48ad4e32f --- /dev/null +++ b/doc/context/presentations/context/2017/context-2017-features-spacetest.tex @@ -0,0 +1,43 @@ +\setupbodyfont[dejavu] + +\startluacode + + -- we could populate this one mostly automatic if needed + -- but also expect a font to have such kerns + + local kern = -50 + local pair = { [32] = kern } + + fonts.handlers.otf.addfeature { + name = "kern", -- spacekerns assume kern (for now) + type = "kern", + data = { + D = pair, + E = pair, + F = pair, + [32] = { + D = kern, + E = kern, + F = kern, + }, + } + } + +\stopluacode + +\starttext + +\enabledirectives[fonts.injections.useitalics] % use italic kerns for tracing + +\definecolor[tgray][s=.5,t=.5,a=1] \showfontkerns \showfontitalics \showglyphs + +\definefontfeature[kern] [mode=node,kern=yes,spacekerns=yes] + +\definedfont[file:dejavu-serif.ttf*kern @ 48pt] +\definedfont[file:dejavu-serif.ttf*default @ 48pt] + +\startTEXpage[offset=10pt,foregroundcolor=tgray] + A B C D E F G H +\stopTEXpage + +\stoptext -- cgit v1.2.3