summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/node-tex.lua
blob: a6eef32693f3ee01102066880907fb3a4513f559 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
if not modules then modules = { } end modules ['node-tex'] = {
    version   = 1.001,
    comment   = "companion to node-ini.mkiv",
    author    = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
    copyright = "PRAGMA ADE / ConTeXt Development Team",
    license   = "see context related readme files"
}

local format = string.format

kernel = kernel or { }

local starttiming, stoptiming = statistics.starttiming, statistics.stoptiming
local hyphenate, ligaturing, kerning = lang.hyphenate, node.ligaturing, node.kerning

function kernel.hyphenation(head)
    --  starttiming(kernel)
    local done = hyphenate(head)
    --  stoptiming(kernel)
    return head, done
end

function kernel.ligaturing(head)
    --  starttiming(kernel)
    local head, tail, done = ligaturing(head) -- todo: check what is returned
    --  stoptiming(kernel)
    return head, done
end

function kernel.kerning(head)
    --  starttiming(kernel)
    local head, tail, done = kerning(head) -- todo: check what is returned
    --  stoptiming(kernel)
    return head, done
end

callbacks.register('hyphenate' , false, "normal hyphenation routine, called elsewhere")
callbacks.register('ligaturing', false, "normal ligaturing routine, called elsewhere")
callbacks.register('kerning'   , false, "normal kerning routine, called elsewhere")