diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-08-25 17:57:42 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-08-25 17:57:42 +0200 |
commit | a389a16197fed7803672a8e16fd31d634725d49a (patch) | |
tree | ff79e88e68f213d0a226f57caa23809e720d3c5c /tex/context/fonts | |
parent | 178de9556e3cb519672f9b54db7b5b29eec43c69 (diff) | |
download | context-a389a16197fed7803672a8e16fd31d634725d49a.tar.gz |
2022-08-25 17:40:00
Diffstat (limited to 'tex/context/fonts')
-rw-r--r-- | tex/context/fonts/mkiv/asana-math.lfg | 4 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/bonum-math.lfg | 102 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/cambria-math.lfg | 80 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/concrete-math.lfg | 33 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/dejavu-math.lfg | 66 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/erewhon-math.lfg | 6 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/garamond-math.lfg | 111 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/generic-math.lfg | 128 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/kpfonts-math.lfg | 14 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/libertinus-math.lfg | 112 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/lm.lfg | 123 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/lucida-opentype-math.lfg | 85 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/pagella-math.lfg | 126 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/schola-math.lfg | 69 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/stix-two-math.lfg | 97 | ||||
-rw-r--r-- | tex/context/fonts/mkiv/termes-math.lfg | 64 |
16 files changed, 1053 insertions, 167 deletions
diff --git a/tex/context/fonts/mkiv/asana-math.lfg b/tex/context/fonts/mkiv/asana-math.lfg index 07a96741b..934f9e0f0 100644 --- a/tex/context/fonts/mkiv/asana-math.lfg +++ b/tex/context/fonts/mkiv/asana-math.lfg @@ -100,6 +100,10 @@ return { { tweak = "addrules", }, + { + tweak = "fixellipses", + }, + }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg index 73a1efcaf..c09b55c20 100644 --- a/tex/context/fonts/mkiv/bonum-math.lfg +++ b/tex/context/fonts/mkiv/bonum-math.lfg @@ -32,6 +32,9 @@ return { parameters = { NoLimitSupFactor = 0, NoLimitSubFactor = 900, + AccentTopShiftUp = -15, + FlattenedAccentTopShiftUp = -15, + -- AccentExtendMargin = 50, AccentBaseDepth = 50, RadicalDegreeBottomRaisePercent = 60, RadicalRuleThickness = 66, -- 72 in font @@ -74,7 +77,7 @@ return { [0x1D450] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- c [0x1D451] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.75 }, -- d [0x1D452] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- e - [0x1D453] = { xoffset = 0.45, width = 1.9, italic = 0.45 }, -- f + [0x1D453] = { xoffset = 0.45, width = 1.9, italic = 0.45, anchor = 1.1 }, -- f [0x1D454] = { xoffset = 0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- g [0x0210E] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 1.15 }, -- h [0x1D456] = { xoffset = -0.2, width = 1.1, italic = 0 }, -- i @@ -180,11 +183,12 @@ return { }, ["lowercasescript"] = { - width = 1.2, - extend = 1.2, - height = 1.2, - depth = 1.2, - squeeze = 1.2, + factor = 1.2, + -- width = 1.2, + -- extend = 1.2, + -- height = 1.2, + -- depth = 1.2, + -- squeeze = 1.2, }, }, }, @@ -195,11 +199,10 @@ return { topleft = -0.2, bottomright = -0.2, }, --- [0x1D453] = { --- [0x0210E] = { --- topleft = 0.5, --- bottomright = -0.2, --- }, + ["0x2F.variants.*"] = { + topleft = -0.2, + bottomright = -0.2, + }, -- [0x28] = { -- left parenthesis. No! -- topleft = -0.1, -- bottomleft = -0.1, @@ -270,6 +273,55 @@ return { }, }, + + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + { -- For upright alphabets, we unset the anchor. -- This means that accents are placed @@ -466,6 +518,19 @@ return { tweak = "addrules", }, { + -- This tweak is only needed for the funny arrows and these now get properly + -- centered. (Could actually be done in the engine). + tweak = "addarrows", + -- These are for documentation purposed as they are the defaults anyway: + left = 0.05, + right = 0.05, + slack = 0.10, + -- The equal doesn't really match the double arrows, as in plain etc, so it still + -- looks somewhat bad when zoomed in. This is the best we could do. Anyway, this + -- in only used when testing (forced) so it doesn't kick in normally. + list = { [0x3D] = { squeeze = .85, yoffset = .0975 } } + }, + { tweak = "kernpairs", list = { [mathematics.tweaks.subsets.acenorsuvxz] = { @@ -521,6 +586,21 @@ return { -- tweak = "fixanchors", -- factor = .5, -- }, + { + tweak = "addbars", + advance = 0.275, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "addfourier", + variant = 1, + }, + }, }, alternates = { diff --git a/tex/context/fonts/mkiv/cambria-math.lfg b/tex/context/fonts/mkiv/cambria-math.lfg index de8b55b22..2207c0645 100644 --- a/tex/context/fonts/mkiv/cambria-math.lfg +++ b/tex/context/fonts/mkiv/cambria-math.lfg @@ -56,6 +56,9 @@ return { parameters = { NoLimitSupFactor = 0, NoLimitSubFactor = 1000, + -- AccentTopShiftUp = 0, + -- FlattenedAccentTopShiftUp = 0, + -- AccentExtendMargin = 50, AccentBaseDepth = 300, RadicalDegreeBottomRaisePercent = 65, RadicalKernAfterDegree = -900, @@ -80,9 +83,9 @@ return { -- [0x002D8] = { yoffset = -0.15 }, -- breve -- [0x002D9] = { yoffset = -0.15 }, -- dot -- [0x000A8] = { yoffset = -0.1 }, -- ddot - [0x020DB] = { yoffset = -0.05 }, -- dddot + -- [0x020DB] = { yoffset = -0.05 }, -- dddot -- [0x002C7] = { yoffset = -0.1 }, -- check - [0x020D7] = { yoffset = -0.05 }, -- vec + -- [0x020D7] = { yoffset = -0.05 }, -- vec -- [0x00300] = { yoffset = -0.12, all=true }, -- widegrave -- [0x00301] = { yoffset = -0.12, all=true }, -- wideacute @@ -90,8 +93,8 @@ return { -- [0x00303] = { yoffset = -0.12, all=true }, -- widetilde -- [0x00304] = { yoffset = -0.12, all=true }, -- widebar -- [0x00306] = { yoffset = -0.12, all=true }, -- widebreve - [0x00307] = { yoffset = -0.025, all=true }, -- widedot - [0x00308] = { yoffset = -0.025, all=true }, -- wideddot + -- [0x00307] = { yoffset = -0.025, all=true }, -- widedot + -- [0x00308] = { yoffset = -0.025, all=true }, -- wideddot -- [0x020DB] = { yoffset = -0.1, all=true }, -- widedddot -- [0x0030A] = { yoffset = -0.12, all=true }, -- widering -- [0x0030C] = { yoffset = -0.12, all=true }, -- widecheck @@ -147,6 +150,55 @@ return { -- ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom, }, }, + + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00302] = { width = 2, anchor = 1.5, xoffset = .25 }, -- widehat + [0x00303] = { width = 2, anchor = 1.5, xoffset = .25 }, -- widetilde + [0x00306] = { width = 2, anchor = 1.5, xoffset = .25 }, -- widebreve + [0x0030C] = { width = 2, anchor = 1.5, xoffset = .25 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + [0x020DB] = { yoffset = -0.03, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + { tweak = "fixprimes", scale = 0.9, @@ -179,6 +231,26 @@ return { { tweak = "wipecues", }, + { + tweak = "addarrows", + }, + { + tweak = "fixslashes", + }, + { + tweak = "addbars", + advance = 0.33, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addfourier", + variant = 1, + }, + -- { -- the ldots are squareshaped and the cdots are circular + -- tweak = "fixellipses", + -- }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/concrete-math.lfg b/tex/context/fonts/mkiv/concrete-math.lfg index f7e5f3dda..ff55d353d 100644 --- a/tex/context/fonts/mkiv/concrete-math.lfg +++ b/tex/context/fonts/mkiv/concrete-math.lfg @@ -21,18 +21,33 @@ return { -- factor = 0.9, -- }, { - tweak = "kerns", - list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, + tweak = "kerns", + list = { + [0x2F] = { + topleft = -0.2, + -- bottomleft = 0, + -- topright = 0, + bottomright = -0.2, }, }, + }, + { + tweak = "fixellipses", + }, + { + tweak = "addbars", + advance = 0.6, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + + + }, }, - }, bigslots = { 1, 2, 3, 4 }, diff --git a/tex/context/fonts/mkiv/dejavu-math.lfg b/tex/context/fonts/mkiv/dejavu-math.lfg index b13150295..c2e909aef 100644 --- a/tex/context/fonts/mkiv/dejavu-math.lfg +++ b/tex/context/fonts/mkiv/dejavu-math.lfg @@ -27,6 +27,9 @@ return { NoLimitSupFactor = 0, NoLimitSubFactor = 900, FractionRuleThickness = 60, + AccentTopShiftUp = -25, + FlattenedAccentTopShiftUp = -25, + -- AccentExtendMargin = 50, AccentBaseDepth = 30, RadicalDegreeBottomRaisePercent = 62, RadicalRuleThickness = 46, -- 52 in font @@ -45,6 +48,7 @@ return { { tweak = "dimensions", list = { + [0x1D44E] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- a -- [0x1D449] = { xoffset = 0, width = .8, italic = .2 }, -- [0x1D44A] = { xoffset = 0, width = .8, italic = .2 }, ["0x1D449:0x1D44A"] = { xoffset = 0, width = .8, italic = .2 }, @@ -107,6 +111,54 @@ return { }, }, + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + [0x020DB] = { yoffset = 0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + { tweak = "fixprimes", -- scale = 0.9, @@ -128,6 +180,20 @@ return { { tweak = "wipecues", }, + { + tweak = "addbars", + advance = 0.175, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "addfourier", + variant = 1, + }, }, }, alternates = { diff --git a/tex/context/fonts/mkiv/erewhon-math.lfg b/tex/context/fonts/mkiv/erewhon-math.lfg index e1e7fe9fd..71ff64648 100644 --- a/tex/context/fonts/mkiv/erewhon-math.lfg +++ b/tex/context/fonts/mkiv/erewhon-math.lfg @@ -87,6 +87,12 @@ return { { tweak = "addrules", }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/garamond-math.lfg b/tex/context/fonts/mkiv/garamond-math.lfg index bdbb6b155..7c1e7ab22 100644 --- a/tex/context/fonts/mkiv/garamond-math.lfg +++ b/tex/context/fonts/mkiv/garamond-math.lfg @@ -11,10 +11,11 @@ return { FractionRuleThickness = 60, OverbarRuleThickness = 60, UnderbarRuleThickness = 60, + AccentTopShiftUp = -75, + FlattenedAccentTopShiftUp = -75, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 75, - -- AccentTopShiftUp = -75, - -- FlattenedAccentTopShiftUp = -100, -- RadicalRuleThickness = 50, -- 50 in font DelimiterPercent = 90, DelimiterShortfall = 400, @@ -32,29 +33,29 @@ return { tweak = "dimensions", list = { -- offset width italic - -- [0x00060] = { yoffset = -0.1 }, -- grave - -- [0x000B4] = { yoffset = -0.1 }, -- acute - [0x002C6] = { yoffset = -0.1 }, -- hat - [0x002DC] = { yoffset = -0.1 }, -- tilde - -- [0x000AF] = { yoffset = -0.1 }, -- bar - [0x002D8] = { yoffset = -0.15 }, -- breve - [0x002D9] = { yoffset = -0.15 }, -- dot - -- [0x000A8] = { yoffset = -0.1 }, -- ddot - [0x020DB] = { yoffset = -0.115 }, -- dddot - [0x002C7] = { yoffset = -0.1 }, -- check - [0x020D7] = { yoffset = -0.1 }, -- vec + -- -- [0x00060] = { yoffset = -0.1 }, -- grave + -- -- [0x000B4] = { yoffset = -0.1 }, -- acute + -- [0x002C6] = { yoffset = -0.1 }, -- hat + -- [0x002DC] = { yoffset = -0.1 }, -- tilde + -- -- [0x000AF] = { yoffset = -0.1 }, -- bar + -- [0x002D8] = { yoffset = -0.15 }, -- breve + -- [0x002D9] = { yoffset = -0.15 }, -- dot + -- -- [0x000A8] = { yoffset = -0.1 }, -- ddot + -- [0x020DB] = { yoffset = -0.115 }, -- dddot + -- [0x002C7] = { yoffset = -0.1 }, -- check + -- [0x020D7] = { yoffset = -0.1 }, -- vec - [0x00300] = { yoffset = -0.12 , all = true }, -- widegrave - [0x00301] = { yoffset = -0.12 , all = true }, -- wideacute - [0x00302] = { yoffset = -0.12 , all = true }, -- widehat - [0x00303] = { yoffset = -0.12 , all = true }, -- widetilde - [0x00304] = { yoffset = -0.12 , all = true }, -- widebar - [0x00306] = { yoffset = -0.12 , all = true }, -- widebreve - [0x00307] = { yoffset = -0.12 , all = true }, -- widedot - [0x00308] = { yoffset = -0.12 , all = true }, -- wideddot - -- [0x020DB] = { yoffset = -0.1 , all = true }, -- widedddot - [0x0030A] = { yoffset = -0.12 , all = true }, -- widering - [0x0030C] = { yoffset = -0.12 , all = true }, -- widecheck + -- [0x00300] = { yoffset = -0.12 , all = true }, -- widegrave + -- [0x00301] = { yoffset = -0.12 , all = true }, -- wideacute + -- [0x00302] = { yoffset = -0.12 , all = true }, -- widehat + -- [0x00303] = { yoffset = -0.12 , all = true }, -- widetilde + -- [0x00304] = { yoffset = -0.12 , all = true }, -- widebar + -- [0x00306] = { yoffset = -0.12 , all = true }, -- widebreve + -- [0x00307] = { yoffset = -0.12 , all = true }, -- widedot + -- [0x00308] = { yoffset = -0.12 , all = true }, -- wideddot + -- -- [0x020DB] = { yoffset = -0.1 , all = true }, -- widedddot + -- [0x0030A] = { yoffset = -0.12 , all = true }, -- widering + -- [0x0030C] = { yoffset = -0.12 , all = true }, -- widecheck -- [0x002C6] = { scale =.85, yoffset = .1, width = .85, height = .935 }, -- hat @@ -147,6 +148,54 @@ return { ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, }, }, + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + -- [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + -- [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + -- [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + -- [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + { tweak = "fixprimes", scale = 0.9, @@ -166,6 +215,20 @@ return { { tweak = "addrules", }, + { + tweak = "addbars", + advance = 0.6, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "addfourier", + variant = 1, + }, }, }, alternates = { diff --git a/tex/context/fonts/mkiv/generic-math.lfg b/tex/context/fonts/mkiv/generic-math.lfg index d50d49af9..490ad1416 100644 --- a/tex/context/fonts/mkiv/generic-math.lfg +++ b/tex/context/fonts/mkiv/generic-math.lfg @@ -45,6 +45,15 @@ return { -- keep = true, -- keep the text size prime (aka minute) }, { + tweak = "fixslashes", + }, + { + tweak = "fixellipses", + }, + { + tweak = "addbreve", + }, + { tweak = "checkspacing", }, { @@ -65,8 +74,127 @@ return { -- } }, { + tweak = "checkspacing", + }, + { + tweak = "addscripts", + }, + { + tweak = "accentdimensions", + }, + { + tweak = "addrules", + }, + { + tweak = "addarrows", + left = 0.1, + right = 0.1, + slack = 0.20, + list = { + [0x21A9] = false, + [0x21AA] = false, + [0x2190] = false, + [0x2192] = false, + [0x219E] = false, + [0x21A0] = false, +-- [0x21A6] = false, +-- [0x21CB] = false, +-- [0x21CC] = false, + } + }, + { + -- For upright alphabets, we unset the anchor. + -- This means that accents are placed + -- centered over the character + tweak = "wipeanchors", + -- list = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, -- todo: ranges + list = { + "digitsbold", + "digitsdoublestruck", + "digitsmonospace", + "digitsnormal", + "digitssansserifbold", + "digitssansserifnormal", + "lowercasebold", + "lowercaseboldfraktur", + "lowercasedoublestruck", + "lowercasefraktur", + "lowercasegreekbold", + "lowercasegreeknormal", + "lowercasegreeksansserifbold", + "lowercasemonospace", + "lowercasenormal", + "lowercasesansserifbold", + "lowercasesansserifnormal", + "uppercasebold", + "uppercaseboldfraktur", + "uppercasedoublestruck", + "uppercasefraktur", + "uppercasegreekbold", + "uppercasegreeknormal", + "uppercasegreeksansserifbold", + "uppercasemonospace", + "uppercasenormal", -- they are italic! + "uppercasesansserifbold", + "uppercasesansserifnormal", + }, + }, + { + -- For non-italic alphabets we + -- remove italic correction. + tweak = "wipeitalics", + list = { + -- "digitsbold", + -- "digitsdoublestruck", + -- "digitsmonospace", + -- "digitsnormal", + -- "digitssansserifbold", + -- "digitssansserifnormal", + -- "lowercasebold", + -- "lowercaseboldfraktur", + -- "lowercasedoublestruck", + -- "lowercasefraktur", + "lowercasemonospace", + "lowercasenormal", + -- "lowercasesansserifbold", + -- "lowercasesansserifnormal", + -- "lowercasegreeknormal", + "uppercasebold", + -- "uppercaseboldfraktur", + -- "uppercasedoublestruck", + -- "uppercasefraktur", + -- "uppercasegreekbold", + -- "uppercasegreeknormal", + -- "uppercasegreeksansserifbold", + "uppercasemonospace", + "uppercasesansserifbold", + "uppercasesanserifnormal", + }, + }, + { + -- This one fakes margins to get larger/smaller accents + -- with for example \widetilde. + -- see lm for many examples + tweak = "margins", + list = { + }, + }, + { tweak = "addrules", }, + { + tweak = "addbars", + advance = 0.1, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "wipecues", + }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/kpfonts-math.lfg b/tex/context/fonts/mkiv/kpfonts-math.lfg index 3c2b89b79..c0b019f79 100644 --- a/tex/context/fonts/mkiv/kpfonts-math.lfg +++ b/tex/context/fonts/mkiv/kpfonts-math.lfg @@ -27,7 +27,9 @@ return { { tweak = "dimensions", list = { - -- whatever + [0x2A3F] = { + factor = 0.84625, + } }, }, { @@ -93,6 +95,16 @@ return { { tweak = "addrules", }, + { + tweak = "addbars", + advance = 0.025, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, }, }, alternates = { diff --git a/tex/context/fonts/mkiv/libertinus-math.lfg b/tex/context/fonts/mkiv/libertinus-math.lfg index 4992b41be..77d0161e3 100644 --- a/tex/context/fonts/mkiv/libertinus-math.lfg +++ b/tex/context/fonts/mkiv/libertinus-math.lfg @@ -18,6 +18,9 @@ return { OverbarRuleThickness = 50, -- RadicalRuleThickness = 50, UnderbarRuleThickness = 50, + AccentTopShiftUp = -35, + FlattenedAccentTopShiftUp = -35, + -- AccentExtendMargin = 50, -- AccentTopShiftUp = 0, AccentBaseDepth = 10, RadicalDegreeBottomRaisePercent = 60, @@ -39,30 +42,30 @@ return { { tweak = "dimensions", list = { - [0x00060] = { yoffset = -0.075 }, -- grave - [0x000B4] = { yoffset = -0.075 }, -- acute - [0x002C6] = { yoffset = -0.075 }, -- hat - [0x002DC] = { yoffset = -0.075 }, -- tilde - -- [0x000AF] = { yoffset = -0.1 }, -- bar - [0x002D8] = { yoffset = -0.075 }, -- breve - [0x002D9] = { yoffset = -0.05 }, -- dot - [0x000A8] = { yoffset = -0.02 }, -- ddot - [0x020DB] = { yoffset = -0.02 }, -- dddot - [0x002DA] = { yoffset = -0.1 }, -- ring - -- [0x002C7] = { yoffset = -0.1 }, -- check - [0x020D7] = { yoffset = -0.1 }, -- vec + -- [0x00060] = { yoffset = -0.075 }, -- grave + -- [0x000B4] = { yoffset = -0.075 }, -- acute + -- [0x002C6] = { yoffset = -0.075 }, -- hat + -- [0x002DC] = { yoffset = -0.075 }, -- tilde + -- -- [0x000AF] = { yoffset = -0.1 }, -- bar + -- [0x002D8] = { yoffset = -0.075 }, -- breve + -- [0x002D9] = { yoffset = -0.05 }, -- dot + -- [0x000A8] = { yoffset = -0.02 }, -- ddot + -- [0x020DB] = { yoffset = -0.02 }, -- dddot + -- [0x002DA] = { yoffset = -0.1 }, -- ring + -- -- [0x002C7] = { yoffset = -0.1 }, -- check + -- [0x020D7] = { yoffset = -0.1 }, -- vec - [0x00300] = { yoffset = -0.1, all = true }, -- widegrave - [0x00301] = { yoffset = -0.1, all = true }, -- wideacute - [0x00302] = { yoffset = -0.1, all = true }, -- widehat - [0x00303] = { yoffset = -0.09, all = true }, -- widetilde - -- [0x00304] = { yoffset = -0.12, all = true }, -- widebar - [0x00306] = { yoffset = -0.05, all = true }, -- widebreve - [0x00307] = { yoffset = -0.02, all = true }, -- widedot - [0x00308] = { yoffset = -0.02, all = true }, -- wideddot - -- [0x020DB] = { yoffset = -0.1, all = true }, -- widedddot - [0x0030A] = { yoffset = -0.12, all = true }, -- widering - [0x0030C] = { yoffset = -0.04, all = true }, -- widecheck + -- [0x00300] = { yoffset = -0.1, all = true }, -- widegrave + -- [0x00301] = { yoffset = -0.1, all = true }, -- wideacute + -- [0x00302] = { yoffset = -0.1, all = true }, -- widehat + -- [0x00303] = { yoffset = -0.09, all = true }, -- widetilde + -- -- [0x00304] = { yoffset = -0.12, all = true }, -- widebar + -- [0x00306] = { yoffset = -0.05, all = true }, -- widebreve + -- [0x00307] = { yoffset = -0.02, all = true }, -- widedot + -- [0x00308] = { yoffset = -0.02, all = true }, -- wideddot + -- -- [0x020DB] = { yoffset = -0.1, all = true }, -- widedddot + -- [0x0030A] = { yoffset = -0.12, all = true }, -- widering + -- [0x0030C] = { yoffset = -0.04, all = true }, -- widecheck -- [0x1D44F] = { width = 1, italic = 0, anchor = 1.5 }, -- b (6.8) -- [0x1D451] = { width = 1, italic = 0, anchor = 1.2 }, -- d (6.8) @@ -119,6 +122,55 @@ return { }, }, + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00302] = { width = 1.8, anchor = 1.40, xoffset = .20 }, -- widehat + [0x00303] = { width = 2.0, anchor = 1.50, xoffset = .30 }, -- widetilde + [0x00306] = { width = 1.6, anchor = 1.30, xoffset = .15 }, -- widebreve + [0x0030C] = { width = 1.3, anchor = 1.15, xoffset = .075 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + + { tweak = "fixprimes", scale = 0.9, @@ -137,6 +189,20 @@ return { { tweak = "addrules", }, + { + tweak = "addbars", + advance = 0.5, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "addfourier", + variant = 1, + }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/lm.lfg b/tex/context/fonts/mkiv/lm.lfg index 250fe9e93..1d81e0b77 100644 --- a/tex/context/fonts/mkiv/lm.lfg +++ b/tex/context/fonts/mkiv/lm.lfg @@ -61,6 +61,24 @@ return { author = "Hans Hagen & Mikael Sundqvist", copyright = "ConTeXt development team", mathematics = { + parameters = { + FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function + NoLimitSupFactor = 0, + NoLimitSubFactor = 900, + AccentTopShiftUp = -60, + FlattenedAccentTopShiftUp = -60, + -- AccentExtendMargin = 50, + -- AccentBaseHeight = 0, + -- AccentBaseDepth = 0, + -- AccentTopOvershoot = 66, + AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?) + AccentSuperscriptPercent = 0, + DelimiterPercent = 90, + DelimiterShortfall = 400, + -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) + PrimeRaisePercent = 60, -- 50 default + PrimeRaiseComposedPercent = 15, -- 25 default + }, tweaks = { aftercopying = { { @@ -79,21 +97,21 @@ return { -- [0x002D9] = { yoffset = -0.05 }, -- dot -- [0x000A8] = { yoffset = -0.05 }, -- ddot -- [0x020DB] = { yoffset = 0.2 }, -- dddot (done below!) - [0x002DA] = { width = 0 }, -- ring (bounding box is wrong) + -- [0x002DA] = { width = 0 }, -- ring (bounding box is wrong) -- [0x002C7] = { yoffset = -0.05 }, -- check -- [0x020D7] = { yoffset = -0.05 }, -- vec - [0x00300] = { yoffset = -0.03, all = true }, -- widegrave - [0x00301] = { yoffset = -0.03, all = true }, -- wideacute - [0x00302] = { yoffset = -0.075, all = true }, -- widehat - [0x00303] = { yoffset = -0.05, all = true }, -- widetilde - [0x00304] = { yoffset = -0.02, all = true }, -- widebar - [0x00306] = { yoffset = -0.05, all = true }, -- widebreve - [0x00307] = { yoffset = -0.027, all = true }, -- widedot - [0x00308] = { yoffset = -0.027, all = true }, -- wideddot - [0x020DB] = { yoffset = -0.065, all = true }, -- widedddot - [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck - [0x0030A] = { yoffset = -0.025, all = true }, -- widering + -- [0x00300] = { yoffset = -0.03, all = true }, -- widegrave + -- [0x00301] = { yoffset = -0.03, all = true }, -- wideacute + -- [0x00302] = { yoffset = -0.075, all = true }, -- widehat + -- [0x00303] = { yoffset = -0.05, all = true }, -- widetilde + -- [0x00304] = { yoffset = -0.02, all = true }, -- widebar + -- [0x00306] = { yoffset = -0.05, all = true }, -- widebreve + -- [0x00307] = { yoffset = -0.027, all = true }, -- widedot + -- [0x00308] = { yoffset = -0.027, all = true }, -- wideddot + -- [0x020DB] = { yoffset = -0.065, all = true }, -- widedddot + -- [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck + -- [0x0030A] = { yoffset = -0.025, all = true }, -- widering -- [0x0212C] = { width = 0.95, italic = 0.05 }, -- script B -- [0x1D49E] = { width = 0.8, italic = 0.25 }, -- script C @@ -241,6 +259,58 @@ return { -- }, }, }, + + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + -- [0x00300] = { width = 0.8 }, -- widegrave + -- [0x00301] = { width = 0.9 }, -- wideacute + [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + -- [0x0030A] = { width = 0.9, xoffset = -.0 }, -- widering + [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + { -- Here we modify "corner kerns". -- We started with 0x2F, the solidus @@ -489,6 +559,20 @@ return { { tweak = "addrules", }, + { + tweak = "addbars", + advance = 0.52, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addfourier", + variant = 1, + }, + { + tweak = "addequals", + }, -- { -- tweak = "wipevariants", -- list = { @@ -497,21 +581,6 @@ return { -- }, }, }, - parameters = { - FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function - NoLimitSupFactor = 0, - NoLimitSubFactor = 900, - -- AccentBaseHeight = 0, - -- AccentBaseDepth = 0, - -- AccentTopOvershoot = 66, - AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?) - AccentSuperscriptPercent = 0, - DelimiterPercent = 90, - DelimiterShortfall = 400, - -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 60, -- 50 default - PrimeRaiseComposedPercent = 15, -- 25 default - }, bigslots = { 1, 3, 5, 7 -- In fact, 6 is the last one. }, diff --git a/tex/context/fonts/mkiv/lucida-opentype-math.lfg b/tex/context/fonts/mkiv/lucida-opentype-math.lfg index a8cd48ca2..372d8cce2 100644 --- a/tex/context/fonts/mkiv/lucida-opentype-math.lfg +++ b/tex/context/fonts/mkiv/lucida-opentype-math.lfg @@ -42,6 +42,9 @@ return { NoLimitSupFactor = 0, NoLimitSubFactor = 900, FractionRuleThickness = 55, + -- AccentTopShiftUp = 0, + -- FlattenedAccentTopShiftUp = 0, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 650, AccentBaseDepth = 150, RadicalDegreeBottomRaisePercent = 50, @@ -110,6 +113,63 @@ return { ["0x7C.variants.4"]={ squeeze = 0.80, height = 0.80, depth = 0.80 }, }, }, + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + -- [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + -- [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + -- [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + -- [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + + { + tweak = "fixslashes", + }, + { + tweak = "fixellipses", + }, + { + tweak = "addbreve", + }, { tweak = "kerns", list = { @@ -189,6 +249,31 @@ return { { tweak = "addrules", }, + { + tweak = "addactuarian", + }, + { + tweak = "addfourier", + -- scale = 1.5, + variant = 1, + }, + { + tweak = "addarrows", + left = 0.1, + right = 0.1, + slack = 0.20, + list = { + [0x21A9] = false, + [0x21AA] = false, + [0x2190] = false, + [0x2192] = false, + [0x219E] = false, + [0x21A0] = false, +-- [0x21A6] = false, +-- [0x21CB] = false, +-- [0x21CC] = false, + } + }, }, }, alternates = { diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg index f03c10d65..9be98adcf 100644 --- a/tex/context/fonts/mkiv/pagella-math.lfg +++ b/tex/context/fonts/mkiv/pagella-math.lfg @@ -9,7 +9,7 @@ local dimensions, kerns if CONTEXTLMTXMODE == 0 then -- [0x1D453] = offset_f, -- 𝑓 -- ["1:0x1D453"] = offset_f, -- needed for compact -- ["2:0x1D453"] = offset_f, -- needed for compact --- ["*:0x1D453"] = offset_f, -- 𝑓 + -- ["*:0x1D453"] = offset_f, -- 𝑓 }, } @@ -28,8 +28,9 @@ local dimensions, kerns if CONTEXTLMTXMODE == 0 then end -- When set this will bypass the italic correction hackery! + local integral_variants = { bottomright = -0.20 } --- local integral_top = { topright = 0.05 } +----- integral_top = { topright = 0.05 } local integral_bottom = { bottomright = -0.20 } @@ -43,11 +44,13 @@ return { parameters = { NoLimitSupFactor = 0, NoLimitSubFactor = 900, - AccentTopShiftUp = 30, + AccentTopShiftUp = 10, + FlattenedAccentTopShiftUp = 10, -- now also set, the wide ones (so we can move in one go) + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 80, --- SpaceAfterScript = 0, --- SpaceAfterScript = 30, + -- SpaceAfterScript = 0, + -- SpaceAfterScript = 30, RadicalDegreeBottomRaisePercent = 60, RadicalKernAfterDegree = -500, RadicalRuleThickness = 54, -- 60 in font @@ -78,36 +81,7 @@ return { { tweak = "dimensions", list = { -- offset width italic - -- [0x002C6] = { scale=.85, yoffset = .1, width = .85, height = .935 }, -- hat - -- [0x00302] = { scale=.85, yoffset = .1, width = .85, height = .935 }, -- hat - -- [0x002C6] = { scale=.75, yoffset = .2, advance = .75, width = .75, height = .90 }, -- hat - -- [0x00302] = { scale=.75, yoffset = .2, advance = .75, width = .75, height = .90 }, -- hat - - [0x00060] = { yoffset = -0.035 }, -- grave - [0x000B4] = { yoffset = -0.035 }, -- acute - [0x002C6] = { yoffset = -0.035 }, -- hat - [0x002DC] = { yoffset = -0.035 }, -- tilde - [0x000AF] = { yoffset = -0.05 }, -- bar - [0x002D8] = { yoffset = -0.035 }, -- breve - [0x002D9] = { yoffset = -0.035 }, -- dot - [0x000A8] = { yoffset = -0.05 }, -- ddot - [0x020DB] = { yoffset = -0.06 }, -- dddot - -- [0x002DA] = { yoffset = -0.05 }, -- ring - -- [0x002C7] = { yoffset = -0.05 }, -- check [0x020D7] = { yoffset = -0.05 }, -- vec - - -- [0x00300] = { yoffset = -0.07, all=true }, -- widegrave - -- [0x00301] = { yoffset = -0.07, all=true }, -- wideacute - [0x00302] = { yoffset = -0.02, all=true }, -- widehat - [0x00303] = { yoffset = -0.02, all=true }, -- widetilde - [0x00304] = { yoffset = -0.05, all=true }, -- widebar - [0x00306] = { yoffset = -0.03, all=true }, -- widebreve - [0x00307] = { yoffset = -0.03, all=true }, -- widedot - [0x00308] = { yoffset = -0.03, all=true }, -- wideddot - -- [0x020DB] = { yoffset = 0, all=true }, -- widedddot - -- [0x0030A] = { yoffset = -0.05, all=true }, -- widering - [0x0030C] = { yoffset = -0.03, all=true }, -- widecheck - [0x1D44E] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- a [0x1D44F] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- b [0x1D450] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- c @@ -132,6 +106,62 @@ return { [0x1D71D] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- \varpi }, }, + + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00300] = { width = 0.9 }, -- widegrave + [0x00301] = { width = 0.9 }, -- wideacute + [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + [0x0030A] = { width = 0.9, xoffset = -.0 }, -- widering + [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + [0x020DB] = { yoffset = -0.01, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + + { + tweak = "fixslashes", + }, + { tweak = "kerns", list = { @@ -141,16 +171,7 @@ return { -- bottomleft = 0, -- topright = 0, bottomright = -0.2, - }, - --- [0x1D453] = { --- topleft = 3, --- bottomleft = 3, --- topright = 3, --- bottomright = 3, --- }, - - + }, ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top @@ -223,6 +244,23 @@ return { { tweak = "addrules", }, + { + tweak = "addarrows", + }, + { + tweak = "addbars", + advance = 0.2, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "addfourier", + variant = 1, + }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/schola-math.lfg b/tex/context/fonts/mkiv/schola-math.lfg index 5c96f9055..cb992cd0b 100644 --- a/tex/context/fonts/mkiv/schola-math.lfg +++ b/tex/context/fonts/mkiv/schola-math.lfg @@ -26,6 +26,9 @@ return { parameters = { NoLimitSupFactor = 0, NoLimitSubFactor = 900, + AccentTopShiftUp = -15, + FlattenedAccentTopShiftUp = -15, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 30, RadicalDegreeBottomRaisePercent = 60, @@ -108,6 +111,57 @@ return { }, }, + + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF + + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) + }, + }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + + + { tweak = "fixprimes", scale = 0.85, @@ -126,6 +180,21 @@ return { { tweak = "addrules", }, + { + tweak = "addbars", + advance = 0.27, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "addfourier", + -- scale = 1.25, + variant = 1, + }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/stix-two-math.lfg b/tex/context/fonts/mkiv/stix-two-math.lfg index bd09c192b..b5e6daf29 100644 --- a/tex/context/fonts/mkiv/stix-two-math.lfg +++ b/tex/context/fonts/mkiv/stix-two-math.lfg @@ -1,5 +1,5 @@ -- When set this will bypass the italic correction hackery! -local integral_variants = { bottomright = -0.20 } +local integral_variants = { bottomright = -0.4 } -- local integral_top = { topright = 0.05 } local integral_bottom = { bottomright = -0.35 } @@ -31,6 +31,8 @@ return { NoLimitSubFactor = 1000, -- AccentBaseHeight = 0, AccentBaseDepth = 30, + FlattenedAccentTopShiftUp = 0, -- now also set, the wide ones (so we can move in one go) + -- AccentExtendMargin = 50, RadicalDegreeBottomRaisePercent = 65, -- RadicalKernBeforeDegree = 500, RadicalKernAfterDegree = -500, @@ -122,34 +124,54 @@ return { feature = "ss01",-- this changes to roundhand style for stixtwo selector = 0xFE01, }, + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00302] = { width = 1.2, anchor = 1.10, xoffset = .05 }, -- widehat + [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. { tweak = "dimensions", list = { - -- [0x00060] = { yoffset = -0.035 }, -- grave - -- [0x000B4] = { yoffset = -0.035 }, -- acute - -- [0x002C6] = { yoffset = -0.035 }, -- hat - -- [0x002DC] = { yoffset = -0.035 }, -- tilde - -- [0x000AF] = { yoffset = -0.05 }, -- bar - -- [0x002D8] = { yoffset = -0.035 }, -- breve - [0x002D9] = { yoffset = -0.02 }, -- dot - [0x000A8] = { yoffset = -0.02 }, -- ddot - [0x020DB] = { yoffset = 0.04 }, -- dddot - -- [0x002DA] = { yoffset = -0.05 }, -- ring - -- [0x002C7] = { yoffset = -0.05 }, -- check - [0x020D7] = { yoffset = -0.07 }, -- vec + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF - -- [0x00300] = { yoffset = -0.07, all=true }, -- widegrave - -- [0x00301] = { yoffset = -0.07, all=true }, -- wideacute - -- [0x00302] = { yoffset = -0.02, all=true }, -- widehat - -- [0x00303] = { yoffset = -0.02, all=true }, -- widetilde - -- [0x00304] = { yoffset = -0.05, all=true }, -- widebar - -- [0x00306] = { yoffset = -0.03, all=true }, -- widebreve - -- [0x00307] = { yoffset = -0.03, all=true }, -- widedot - -- [0x00308] = { yoffset = -0.03, all=true }, -- wideddot - -- [0x020DB] = { yoffset = 0, all=true }, -- widedddot - -- [0x0030A] = { yoffset = -0.05, all=true }, -- widering + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + [0x020DB] = { yoffset = 0.025, height = .95, all = true }, -- widedddot : 0x20DB (self) }, }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + { tweak = "fixprimes", scale = 1, @@ -168,6 +190,35 @@ return { { tweak = "addrules", }, + { + tweak = "addarrows", + }, + { + tweak = "fixslashes", + }, + { -- already exists, but not good spacing + tweak = "addbars", + advance = 0.4, + }, + { + tweak = "addfourier", + variant = 1, + }, +{ + tweak = "addparts", + list = { + [0x21F4] = { + horizontal = true, + template = 0x2192, + sequence = { + { glyph = "first", factor = 2 }, + { glyph = 0x2022, }, + { glyph = "first", factor = 2 }, + { glyph = "last" }, + } + } + } +}, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg index f45ee4433..c5bcb3e84 100644 --- a/tex/context/fonts/mkiv/termes-math.lfg +++ b/tex/context/fonts/mkiv/termes-math.lfg @@ -33,6 +33,9 @@ return { parameters = { NoLimitSupFactor = 0, NoLimitSubFactor = 900, + AccentTopShiftUp = -15, + FlattenedAccentTopShiftUp = -15, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 50, RadicalDegreeBottomRaisePercent = 60, @@ -125,11 +128,56 @@ return { ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom, ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom, ["0x2233.variants.*"] = integral_variants, ["0x2233.parts.top"] = integral_top, ["0x2233.parts.bottom"] = integral_bottom, + }, + }, + -- Accents are a mess. We migrate the extensibles from the combiners to the base accent + -- and then need to tweak the width (which is auto set because it was zero with a large + -- accent anchor offset). First we copy and fix. + { + tweak = "extendaccents", + }, + { + tweak = "fixaccents", + }, + -- First we set the dimensions of the initial accent which started out as zero but we want + -- a proper width. + { + tweak = "dimensions", + list = { + [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat + [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde + [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve + [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck + }, + }, + -- Then we deal with all offsets and heights in one go. So we treat the initial accent + -- as well as the variants here. + { + tweak = "dimensions", + list = { + -- here we want to apply to all + -- [0x00300] = { yoffset = -0.02, height = .95, all = true }, -- widegrave : 0x0060 + -- [0x00301] = { yoffset = -0.02, height = .95, all = true }, -- wideacute : 0x00B4 + -- [0x00302] = { yoffset = -0.03, height = .95, all = true }, -- widehat : 0x02C6 + -- [0x00303] = { yoffset = -0.02, height = .95, all = true }, -- widetilde : 0x02DC + -- [0x00306] = { yoffset = -0.03, height = .95, all = true }, -- widebre : 0x02D8 + -- [0x0030A] = { yoffset = 0.00, height = .95, all = true }, -- widering : 0x02DA + -- [0x0030C] = { yoffset = -0.03, height = .95, all = true }, -- widecheck : 0x02C7 + -- [0x00304] = { yoffset = -0.05, height = .95, all = true }, -- widebar : 0x00AF - + -- [0x00307] = { yoffset = -0.03, height = .95, all = true }, -- widedot : 0x02D9 + -- [0x00308] = { yoffset = -0.03, height = .95, all = true }, -- wideddot : 0x00A8 + -- [0x020DB] = { yoffset = -0.015, height = .95, all = true }, -- widedddot : 0x20DB (self) }, }, + -- We now copy these to the not wide slots so that we can set these to stretch as well, + -- if only because it is less confusing and more consistent. + { + tweak = "copyaccents", + }, + -- So far for the accents. + { tweak = "fixprimes", scale = 0.85, @@ -148,6 +196,20 @@ return { { tweak = "addrules", }, + { + tweak = "addbars", + advance = 0.3, + }, + { + tweak = "addactuarian", + }, + { + tweak = "addequals", + }, + { + tweak = "addfourier", + variant = 1, + }, }, }, bigslots = { |