summaryrefslogtreecommitdiff
path: root/tex/context/fonts/mkiv/euler-math.lfg
blob: 1c4659786fa4608ce32628cb2c2a81b6980d8401 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
local common  = fonts.goodies.load("common-math.lfg")
local presets = common.mathematics.tweaks.presets

return {
    name = "euler-math",
    version = "1.00",
    comment = "Goodies that complement euler math.",
    author = "Hans Hagen",
    copyright = "ConTeXt development team",
    mathematics = {
        parameters = {
            -- DelimiterPercent                 =  90,
            -- DelimiterShortfall               =  500,
            -- taken from pagella:
            NoLimitSupFactor                =    0,
            NoLimitSubFactor                =  900,
            AccentTopShiftUp                =   10,
            FlattenedAccentTopShiftUp       =   10,
         -- AccentExtendMargin              =   50,
         -- AccentBaseHeight                =    0,
            AccentBaseDepth                 =   80,
         -- SpaceAfterScript                =   0,
         -- SpaceAfterScript                =   30,
            RadicalDegreeBottomRaisePercent =   60,
            RadicalKernAfterDegree          = -500,
            RadicalRuleThickness            =   60, --   60 in font
            DelimiterPercent                =   90,
            DelimiterShortfall              =  400,
            DisplayOperatorMinHeight        = 1800, -- 1500 in font
            PrimeRaisePercent               =   75, --   50 default
            PrimeRaiseComposedPercent       =   10, --   25 default
         -- RadicalKernAfterExtensible      =    0, --    0 default
         -- RadicalKernBeforeExtensible     =    0, --    0 default

        },
        tweaks = {
            aftercopying = {
                {
                    tweak    = "version",
                    expected = "Version 000.002 ",
                },
                {
                    tweak   = "fixprimes",
                    factor  =  1.2,
                    smaller = true,
                    scale   = 0.80,
                    fake    = 0.80,
                },
                {
                    tweak    = "replacealphabets",
                    feature  = "pagellaovereuler",
                    filename = "texgyrepagella-math.otf",
                    list    = {
                    -- { source = { first = 0x02100, last = 0x0210D } }, -- no 0x2210E
                    -- { source = { first = 0x0210F, last = 0x02BFF } },
                    { source = { first = 0x02100, last = 0x02BFF } },
                    { source = { first = 0x1D400, last = 0x1D7FF } },
                    { source = { first = 0x1D538, last = 0x1D550 } },
                    },
                },
                {
                    tweak = "addmirrors",
                },
                presets.scripttocalligraphic { },
                presets.rsfstoscript         { },
                presets.rsfsuprighttoscript  { },
                presets.moderntocalligraphic { },
                presets.eulertocalligraphic  { },
                presets.xitsarabic           { rscale  = 1 },
                presets.fallbacks            { },
                presets.moveitalics          { correct = true },
                presets.moveitalics          { correct = true, letters = true },
                presets.moveintegrals        { },
                presets.wipeitalics          { },
                {
                    tweak   = "fixoldschool",
                },
        -- add the accent fixes
        -- fixslashes?
                {
                    tweak = "checkspacing",
                },
                {
                    tweak = "addscripts",
                },
                {
                    tweak = "addprivates",
                },
                {
                    tweak = "accentdimensions",
                },
                {
                    tweak = "addrules",
                },
                {
                    tweak = "addarrows",
                },
                {
                    tweak   = "addbars",
                    advance = 0.2,
                },
                {
                    tweak = "addactuarian",
                },
                {
                    tweak = "addequals",
                },
                {
                    tweak   = "addfourier",
                    variant = 1,
                },
                -- this is the mkiv section
                {
                    tweak   = "emulatelmtx",
                    feature = "emulatelmtx",
                    comment = "this is for mkiv",
                },
            },
        },
        bigslots = {
            1, 3, 5, 7
        },
        alternates = {
            dotless = { feature = 'dtls', value = 1, comment = "Mathematical Dotless Forms" },
        },
    },
}