[luatex] callbacks in luatex 0.89

Hans Hagen pragma at wxs.nl
Sat Feb 13 13:05:19 CET 2016


On 2/12/2016 11:26 PM, Philipp Gesang wrote:
> ···<date: 2016-02-11, Thursday>···<from: Hans Hagen>···
>> return function(specification)
>>       local t = { }
>>       for k, v in pairs(specification.features.normal) do
>
> With Plain from Context 2016.02.08 15:35, features.normal contains:

i'll add a (plain) example to the distribution

you can change this on the def file:

	local sometext=(R("az","AZ","09")+S("+-.{}"))^1

and then in the vf lua file

         local name, rest = string.match(v,"^(.-){(.*)}$")

and then

     \font\crapa=lmroman12-regular:mode=base;liga=yes;kern=yes; at 12pt
     \font\crapb=lmsans12-regular:mode=base;liga=yes;kern=yes;  at 30pt
 
\font\mine=file:luatex-fonts-demo-vf-4.lua:1=\fontid\crapa;2=\fontid\crapb{0x41-0x5A+0x30-0x39+0x21}; 
at 12pt

kind of works ok (not in context but that doesn't matter)

> This matches no entry -> only the first font is ever used. It’s
> obvious what the code is intended to accomplish but it won’t work
> as-is with the spec parser.

the generic spec parser (as context itself uses a different one).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list