summaryrefslogtreecommitdiff
path: root/tex/context/fonts/demo.lfg
blob: 06c59e644276b9be70d161412f67ecb0740da8c6 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
-- see test suite: goodies-002.tex

local yes = "yes"

local default = {
    analyze  = yes,
    mode     = "node",
    language = "dflt",
    script   = "dflt",
}

local smallcaps = {
    smcp = yes,
}

local function statistics(tfmdata)
    commands.showfontparameters(tfmdata)
end

local function squeeze(tfmdata)
    for k, v in next, tfmdata.characters do
        v.height = 0.75 * (v.height or 0)
        v.depth  = 0.75 * (v.depth  or 0)
    end
end

return {
    name = "demo",
    version = "1.01",
    comment = "An example of goodies.",
    author = "Hans Hagen",
    featuresets = {
        simple = {
            mode   = "node",
            script = "latn"
        },
        default = {
            mode   = "node",
            script = "latn",
            kern   = "yes",
        },
        ligatures = {
            mode   = "node",
            script = "latn",
            kern   = "yes",
            liga   = "yes",
        },
        smallcaps = {
            mode   = "node",
            script = "latn",
            kern   = "yes",
            smcp   = "yes",
        },
    },
    solutions = { -- here we have references to featuresets, so we use strings!
        experimental = {
            less = {
                "ligatures", "simple",
            },
            more = {
                "smallcaps",
            },
        },
    },
    colorschemes = {
        default = {
            [1] = {
                "one", "three", "five", "seven", "nine",
            },
            [2] = {
                "two", "four", "six", "eight", "ten",
            },
        },
        all = {
            [1] = {
                "*",
            },
        },
        some = {
            [1] = {
                "0x0030:0x0035",
            },
        },
    },
    postprocessors = {
        statistics = statistics,
        squeeze    = squeeze,
    },
}