gfsneohellenic-math.lfg /size: 4871 b    last modification: 2025-02-21 11:03
1local common  = fonts.goodies.load("common-math.lfg")
2local presets = common.mathematics.tweaks.presets
3
4-- Initial support for the font.
5-- Tell us if something looks weird.
6return {
7    name = "gfsneohellenic",
8    version = "1.00",
9    comment = "Goodies that complement gfsneohellenicmath.",
10    author = "Hans Hagen & Mikael Sundqvist",
11    copyright = "ConTeXt development team",
12    mathematics = {
13        parameters = {
14            DelimiterPercent                     =  85,
15            DelimiterShortfall                   = 400,
16            DelimiterDisplayPercent              =  90,
17            DelimiterDisplayShortfall            = 400,
18        },
19        tweaks = {
20            aftercopying = {
21                {
22                    tweak    = "version",
23                    expected = "Version 1.02",
24                },
25                {
26                    tweak   = "fixprimes",
27                    factor  = 0.825,
28                    smaller = true,
29                    fake    = 0.8,
30                },
31                presets.scripttocalligraphic { },
32                presets.rsfstoscript         { },
33                presets.rsfsuprighttoscript  { },
34                presets.moderntocalligraphic { },
35                presets.eulertocalligraphic  { },
36                presets.xitsarabic           { rscale  = 0.80 },
37                presets.fallbacks            { },
38                presets.moveitalics          { correct = true },
39                presets.moveitalics          { correct = true, letters = true },
40                presets.moveintegrals        { },
41                presets.wipeanchors          { },
42                presets.wipeitalics          { },
43                {
44                    tweak = "checkaccents",
45                },
46                {
47                    tweak = "wipecues",
48                },
49                {
50                    tweak = "addcomposites",
51                },
52                {
53                    tweak = "kerns",
54                    list  = {
55                        ["0x7D.parts.top"]      = { topright = -0.25                      }, -- right brace top
56                        ["0x7D.parts.bottom"]   = {                   bottomright = -0.25 }, -- right brace bottom
57                        ["0x7D.variants.*"]     = { topright = -0.25, bottomright = -0.25 }, -- right brace variants
58                        ["0x29.parts.top"]      = { topright =  -0.3,                     }, -- right parenthesis top
59                        ["0x29.parts.bottom"]   = {                   bottomright = -0.3  }, -- right parenthesis bottom
60                        ["0x29.variants.*"]     = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants
61                        ["0x221A.parts.top"]    = { topright =  0.2,                      }, -- right radical top
62                        ["0x221A.parts.bottom"] = {                   bottomright =  0.2  }, -- right radical bottom
63                        ["0x221A.variants.*"]   = { topright =  0.2,  bottomright =  0.2  }, -- right radical variants
64                        [0x27E9]                = { topright = -0.2,  bottomright = -0.2  }, -- angles
65                        ["0x27E9.variants.*"]   = { topright = -0.3,  bottomright = -0.3  },
66                        [0x27EB]                = { topright = -0.2,  bottomright = -0.2  },
67                        ["0x27EB.variants.*"]   = { topright = -0.3,  bottomright = -0.3  },
68
69                    },
70                },
71                {
72                    tweak = "flattenaccents",
73                },
74                {
75                    tweak = "checkspacing",
76                },
77                {
78                    tweak = "fixradicals",
79                },
80                {
81                    tweak = "addscripts",
82                },
83                {
84                    tweak = "accentdimensions",
85                },
86                {
87                    tweak = "addrules",
88                },
89                -- Font has extensible minus, but it looks like the LM one
90                -- {
91                --     tweak    = "replacerules",
92                --     -- minus    = true, -- we have an extensible
93                --     fraction = { height = .15, yoffset = .85 },
94                --     radical  = { height = .15, yoffset = .823, leftoffset = .065, rightoffset = .065, leftoverlap = 0.03 },
95                --     stacker  = { height = .15, yoffset = .85 },
96                -- },
97                {
98                    tweak = "addfourier",
99                    variant = 1,
100                },
101                {
102                    tweak   = "addprimed",
103                },
104            },
105        },
106        bigs = {
107            1, 2, 3, 4
108        },
109        --
110        -- experimental fixes for mkiv:
111        --
112        dimensions = dimensions,
113        kerns = kerns,
114    },
115}
116