demo.lfg /size: 1877 b    last modification: 2020-07-01 14:35
1-- see test suite: goodies-002.tex
2
3local yes = "yes"
4
5local default = {
6    analyze  = yes,
7    mode     = "node",
8    language = "dflt",
9    script   = "dflt",
10}
11
12local smallcaps = {
13    smcp = yes,
14}
15
16local function statistics(tfmdata)
17    commands.showfontparameters(tfmdata)
18end
19
20local function squeeze(tfmdata)
21    for k, v in next, tfmdata.characters do
22        v.height = 0.75 * (v.height or 0)
23        v.depth  = 0.75 * (v.depth  or 0)
24    end
25end
26
27return {
28    name = "demo",
29    version = "1.01",
30    comment = "An example of goodies.",
31    author = "Hans Hagen",
32    featuresets = {
33        simple = {
34            mode   = "node",
35            script = "latn"
36        },
37        default = {
38            mode   = "node",
39            script = "latn",
40            kern   = "yes",
41        },
42        ligatures = {
43            mode   = "node",
44            script = "latn",
45            kern   = "yes",
46            liga   = "yes",
47        },
48        smallcaps = {
49            mode   = "node",
50            script = "latn",
51            kern   = "yes",
52            smcp   = "yes",
53        },
54    },
55    solutions = { -- here we have references to featuresets, so we use strings!
56        experimental = {
57            less = {
58                "ligatures", "simple",
59            },
60            more = {
61                "smallcaps",
62            },
63        },
64    },
65    colorschemes = {
66        default = {
67            [1] = {
68                "one", "three", "five", "seven", "nine",
69            },
70            [2] = {
71                "two", "four", "six", "eight", "ten",
72            },
73        },
74        all = {
75            [1] = {
76                "*",
77            },
78        },
79        some = {
80            [1] = {
81                "0x0030:0x0035",
82            },
83        },
84    },
85    postprocessors = {
86        statistics = statistics,
87        squeeze    = squeeze,
88    },
89}
90