diff options
Diffstat (limited to 'tex/context/fonts/mkiv')
22 files changed, 357 insertions, 136 deletions
diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg index dfce35d80..736b8a176 100644 --- a/tex/context/fonts/mkiv/bonum-math.lfg +++ b/tex/context/fonts/mkiv/bonum-math.lfg @@ -24,11 +24,16 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1900, -- 1250 in font - -- AccentSuperscriptDrop = 100, - -- AccentSuperscriptPercent = 20, - -- PrimeRaisePercent = 50, - PrimeRaiseComposedPercent = 0, - -- PrimeShiftUp = 0, + -- ScriptPercentScaleDown = 65, -- 77 in font + -- ScriptScriptPercentScaleDown = 50, -- 60 in font + SubscriptShiftDown = 201, -- 231 in font + SuperscriptShiftUp = 364, -- 334 in font + SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- trial and error + -- PrimeRaisePercent = 0, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 0, -- set to 0 in math-act + PrimeShiftUp = "1.25*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.25*SuperscriptShiftUp", + -- PrimeBaselineDropMax = 0, }, tweaks = { @@ -41,7 +46,7 @@ return { tweak = "fixprimes", -- scale = 0.8, -- smaller = true, - factor = 1,--1.1 + factor = 0.77,--1.1 }, { tweak = "addmirrors", @@ -121,8 +126,8 @@ return { [0x0029] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants ["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top - ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom -- radical - [0x221A] = { topright = 0.2, bottomright = 0.2 }, + ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom + [0x221A] = { topright = 0.2, bottomright = 0.2 }, -- radical ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 }, ["0x221A.parts.top"] = { topright = 0.2, }, ["0x221A.parts.bottom"] = { bottomright = 0.2 }, @@ -131,6 +136,8 @@ return { [0x27EB] = { topright = -0.1, bottomright = -0.1 }, ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- + [0x1D465] = { bottomright = -0.05, }, -- italic x (ic is too large) + [0x00393] = { bottomright = -0.30, }, -- upright Gamma -- [0x222B] = integral_variants, ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = { bottomright = -0.20 }, -- int ["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint @@ -420,6 +427,9 @@ return { tweak = "addfourier", variant = 1, }, + { + tweak = "addprimed", + }, -- this is the mkiv section { tweak = "emulatelmtx", diff --git a/tex/context/fonts/mkiv/cambria-math.lfg b/tex/context/fonts/mkiv/cambria-math.lfg index 97cea6674..e4791fc79 100644 --- a/tex/context/fonts/mkiv/cambria-math.lfg +++ b/tex/context/fonts/mkiv/cambria-math.lfg @@ -21,8 +21,10 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 2800, -- 2500 in font - PrimeRaisePercent = 75, -- 50 default - -- PrimeRaiseComposedPercent = 25, -- 25 default + -- PrimeRaisePercent = 0, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act + PrimeShiftUp = "1.25*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.25*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -46,35 +48,28 @@ return { { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - ["0x7D.parts.top"] = { - topright = -0.1, - }, - ["0x7D.parts.bottom"] = { - bottomright = -0.1, - }, - ["0x29.parts.top"] = { - topright = -0.2, - }, - ["0x29.parts.bottom"] = { - bottomright = -0.2, - }, - ["0x221A.parts.top"] = { - topright = 0.2, - }, - ["0x221A.parts.bottom"] = { - bottomright = 0.2, - }, - ["0x221A.variants.*"] = { - topright = 0.2, - bottomright = 0.2, - }, - + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 }, + -- No! + -- [0x0028] = { topleft = -0.1, bottomleft = -0.1 }, -- left parenthesis + -- [0x0029] = { topright = -0.1, bottomright = -0.1, all = true }, -- right parenthesis + -- + [0x007D] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants + ["0x7D.variants.*"] = { topright = -0.10, bottomright = -0.10 }, -- right brace variants + ["0x7D.parts.top"] = { topright = -0.10, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.10 }, -- right brace bottom + [0x0029] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants + ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants + ["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom + [0x221A] = { topright = 0.2, bottomright = 0.2 }, -- radical + ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 }, + ["0x221A.parts.top"] = { topright = 0.2, }, + ["0x221A.parts.bottom"] = { bottomright = 0.2 }, + [0x27E9] = { topright = -0.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- Keep as example. not needed in cambria (after all it is the reference): [0x2A0C] = { bottomright = -0.1 }, -- iiiint does not have any ic @@ -156,9 +151,10 @@ return { { tweak = "fixprimes", - scale = 0.9, + -- scale = 1.0, -- smaller = true, - factor = 0.9, + factor = 0.83, + fake = 0.8, }, { tweak = "checkspacing", @@ -206,6 +202,9 @@ return { tweak = "addfourier", variant = 2, }, + { + tweak = "addprimed", + }, -- { -- the ldots are squareshaped and the cdots are circular -- tweak = "fixellipses", -- }, diff --git a/tex/context/fonts/mkiv/common-math.lfg b/tex/context/fonts/mkiv/common-math.lfg index 85915c26a..d2785b3b2 100644 --- a/tex/context/fonts/mkiv/common-math.lfg +++ b/tex/context/fonts/mkiv/common-math.lfg @@ -214,6 +214,7 @@ return { return { tweak = "movelimits", factor = parameters.factor or 1, + icfactor = parameters.icfactor or 1, list = mathematics.tweaks.subsets.integrals, } end, diff --git a/tex/context/fonts/mkiv/concrete-math.lfg b/tex/context/fonts/mkiv/concrete-math.lfg index c107cfdeb..d0fc5749f 100644 --- a/tex/context/fonts/mkiv/concrete-math.lfg +++ b/tex/context/fonts/mkiv/concrete-math.lfg @@ -14,12 +14,16 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1400 in font (one size) + -- PrimeRaisePercent = 0, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act + PrimeShiftUp = "1.2*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.2*SuperscriptShiftUp", }, tweaks = { aftercopying = { { tweak = "fixprimes", - factor = 0.8, + factor = 0.92, }, -- there are circular variants -- { @@ -44,6 +48,43 @@ return { [0x002F] = { topleft = -0.2, bottomright = -0.2 }, }, }, + { + tweak = "kerns", + list = { + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 }, + -- No! + -- [0x0028] = { topleft = -0.1, bottomleft = -0.1 }, -- left parenthesis + -- [0x0029] = { topright = -0.1, bottomright = -0.1, all = true }, -- right parenthesis + -- + [0x007D] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants + ["0x7D.variants.*"] = { topright = -0.25, bottomright = -0.25 }, -- right brace variants + ["0x7D.parts.top"] = { topright = -0.25, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.25 }, -- right brace bottom + [0x0029] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants + ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants + ["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom + [0x221A] = { topright = 0.2, bottomright = 0.2 }, -- radical + ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 }, + ["0x221A.parts.top"] = { topright = 0.2, }, + ["0x221A.parts.bottom"] = { bottomright = 0.2 }, + [0x27E9] = { topright = -0.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + -- + [0x00393] = { bottomright = -0.30, }, -- upright Gamma + }, + }, + + { + tweak = "dimensions", + list = { + [0x00393] = { width = 0.875, }, -- upright Gamma + }, + }, + { tweak = "radicaldegreeanchors", @@ -79,6 +120,9 @@ return { variant = 2, }, { + tweak = "addprimed", + }, + { tweak = "setoptions", set = { "ignorekerndimensions" } }, diff --git a/tex/context/fonts/mkiv/dejavu-math.lfg b/tex/context/fonts/mkiv/dejavu-math.lfg index 728a5f2fc..af6a4bd55 100644 --- a/tex/context/fonts/mkiv/dejavu-math.lfg +++ b/tex/context/fonts/mkiv/dejavu-math.lfg @@ -24,8 +24,15 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1333 in font + -- ScriptPercentScaleDown = 70, -- 80 in font (set in typescript) + -- ScriptScriptPercentScaleDown = 55, -- 65 in font (set in typescript) + SubscriptShiftDown = 177, -- 277 in font + SuperscriptShiftUp = 428, -- 381 in font + SubscriptShiftDownWithSuperscript = "1.3*SubscriptShiftDown", -- trial and error -- PrimeRaisePercent = 50, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + -- PrimeRaiseComposedPercent = 10, -- 25 default + PrimeShiftUp = "1.4*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.4*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -33,17 +40,9 @@ return { tweak = "version", expected = "Version 1.106", }, --- { --- tweak = "fixprimes", --- scale = 0.85, --- -- smaller = true, --- factor = 1, --- }, { tweak = "fixprimes", - scale = 1, - -- smaller = true, - factor = 0.8, + factor = 0.63, }, { tweak = "addmirrors", @@ -89,7 +88,8 @@ return { [0x27EB] = { topright = -0.1, bottomright = -0.1 }, ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- - + [0x00393] = { bottomright = -0.30, }, -- upright Gamma + -- ["0x222B.parts.bottom"] = { bottomright = -0.20 }, -- int ["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint ["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint @@ -197,6 +197,9 @@ return { tweak = "addfourier", variant = 1, }, + { + tweak = "addprimed", + }, -- this is the mkiv section { tweak = "emulatelmtx", diff --git a/tex/context/fonts/mkiv/ebgaramond-math.lfg b/tex/context/fonts/mkiv/ebgaramond-math.lfg index afdd66279..43bafadd1 100644 --- a/tex/context/fonts/mkiv/ebgaramond-math.lfg +++ b/tex/context/fonts/mkiv/ebgaramond-math.lfg @@ -22,9 +22,15 @@ return { -- RadicalRuleThickness = 50, -- 50 in font DelimiterPercent = 90, DelimiterShortfall = 400, + SubscriptShiftDown = 200, -- 250 in font + SuperscriptShiftUp = 400, -- 430 in font + SubscriptShiftDownWithSuperscript = "1.25*SubscriptShiftDown", -- trial and error + SubSuperscriptGapMin = 200, -- 250 in font -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 85, -- 50 default - -- PrimeRaiseComposedPercent = 25, -- 25 default + -- PrimeRaisePercent = 0, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act + PrimeShiftUp = "1.2*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.2*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -34,9 +40,9 @@ return { }, { tweak = "fixprimes", - scale = 0.95, + -- scale = 1, -- smaller = true, - factor = 0.95, + factor = 0.73, -- fake = 0.75, }, { @@ -232,6 +238,9 @@ return { tweak = "addfourier", variant = 2, }, + { + tweak = "addprimed", + }, -- this is the mkiv section { tweak = "emulatelmtx", diff --git a/tex/context/fonts/mkiv/erewhon-math.lfg b/tex/context/fonts/mkiv/erewhon-math.lfg index cf2e7f28c..0cb72d149 100644 --- a/tex/context/fonts/mkiv/erewhon-math.lfg +++ b/tex/context/fonts/mkiv/erewhon-math.lfg @@ -22,14 +22,19 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (one size) + SubscriptShiftDown = 200, -- 220 in font + SuperscriptShiftUp = 400, -- 400 in font + SubscriptShiftDownWithSuperscript = "1.2*SubscriptShiftDown", -- unclear original value, trial and error + PrimeShiftUp = "1.1*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.1*SuperscriptShiftUp", }, tweaks = { aftercopying = { { tweak = "fixprimes", -- smaller = true, -- replace multiples - factor = 0.9, - scale = 1.0, + factor = 0.94 , + -- scale = 1.0, fake = 0.85, -- replace multiples with this width proportion }, { @@ -72,6 +77,7 @@ return { ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, [0x27EB] = { topright = -0.1, bottomright = -0.1 }, ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x00393] = { bottomright = -0.30, }, -- upright Gamma }, }, { @@ -114,6 +120,9 @@ return { variant = 2, }, { + tweak = "addprimed", + }, + { tweak = "setoptions", -- set = { "ignorekerndimensions" } }, diff --git a/tex/context/fonts/mkiv/kpfonts-math.lfg b/tex/context/fonts/mkiv/kpfonts-math.lfg index 385170aab..7cb968860 100644 --- a/tex/context/fonts/mkiv/kpfonts-math.lfg +++ b/tex/context/fonts/mkiv/kpfonts-math.lfg @@ -21,8 +21,11 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1500 in font (only one) - PrimeRaisePercent = 25, -- 50 default - -- PrimeRaiseComposedPercent = 25, -- 25 default + -- PrimeRaisePercent = 25, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act + PrimeShiftUp = "1.15*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.15*SuperscriptShiftUp", + SubscriptShiftDownWithSuperscript = "1.2*SubscriptShiftDown", -- unclear original value, trial and error }, tweaks = { aftercopying = { @@ -54,7 +57,7 @@ return { }, { tweak = "fixprimes", - factor = 1.4, -- accent base height + factor = 0.86, -- accent base height smaller = true, -- replace multiples scale = 1, -- glyph scale fake = 0.8, -- replace multiples with this width proportion @@ -142,6 +145,9 @@ return { variant = 2, }, { + tweak = "addprimed", + }, + { tweak = "setoptions", set = { "ignorekerndimensions" } }, diff --git a/tex/context/fonts/mkiv/libertinus-math.lfg b/tex/context/fonts/mkiv/libertinus-math.lfg index 71863fb59..30f8f6456 100644 --- a/tex/context/fonts/mkiv/libertinus-math.lfg +++ b/tex/context/fonts/mkiv/libertinus-math.lfg @@ -4,7 +4,6 @@ -- fix-feature or just disable ssty, but we have to revert to a runtime fix. Lucky me that I didn't -- remove that hardly needed 'tweaks' mechanism yet. --- The italic x has a rectangular piece in its eye (redundant point) local common = fonts.goodies.load("common-math.lfg") local presets = common.mathematics.tweaks.presets @@ -34,8 +33,10 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1250 in font (only one) - PrimeRaisePercent = 70, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + -- PrimeRaisePercent = 70, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act + PrimeShiftUp = "1.2*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.2*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -88,7 +89,8 @@ return { ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, [0x27EB] = { topright = -0.1, bottomright = -0.1 }, ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - + -- + [0x00393] = { bottomright = -0.30, }, -- upright Gamma }, }, -- Accents are a mess. We migrate the extensibles from the combiners to the base accent @@ -157,10 +159,10 @@ return { { tweak = "fixprimes", - scale = 0.9, + -- scale = 1, -- smaller = true, - factor = 0.9, - fake = 0.8, + factor = 0.92, + fake = 0.75, }, { tweak = "checkspacing", @@ -189,6 +191,9 @@ return { variant = 1, }, { + tweak = "addprimed", + }, + { -- needed for integrals (bad axis) and (less prominent) fences tweak = "setoptions", set = { "ignorekerndimensions" } diff --git a/tex/context/fonts/mkiv/lucida-math.lfg b/tex/context/fonts/mkiv/lucida-math.lfg index 6842d505b..f0ab84b8b 100644 --- a/tex/context/fonts/mkiv/lucida-math.lfg +++ b/tex/context/fonts/mkiv/lucida-math.lfg @@ -28,9 +28,11 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 60, -- 50 default - PrimeRaiseComposedPercent = 50, -- 25 default - AxisHeight = 325, -- we keep the old fonts as they are (also for demos) + SuperscriptBottomMaxWithSubscript = 325, + -- PrimeRaisePercent = 60, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 50, -- set to 0 in math-act + PrimeShiftUp = "1.4*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.4*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -217,12 +219,13 @@ return { }, }, { - tweak = "fixprimes", - factor = 0.8, -- accent base height - -- smaller = true, -- replace multiples - scale = 1.1, -- glyph scale - fake = 0.65, -- replace multiples with this width proportion - -- keep = true, -- keep the text size prime (aka minute) + tweak = "fixprimes", + -- factor = 0.75, -- accent base height + factor = 0.7, -- accent base height + -- smaller = true, -- replace multiples + -- scale = 1.1, -- glyph scale + fake = 0.65, -- replace multiples with this width proportion + -- keep = true, -- keep the text size prime (aka minute) }, { tweak = "checkspacing", @@ -245,6 +248,9 @@ return { variant = 1, }, { + tweak = "addprimed", + }, + { tweak = "addarrows", left = 0.1, right = 0.1, diff --git a/tex/context/fonts/mkiv/minion-math.lfg b/tex/context/fonts/mkiv/minion-math.lfg index 82b0b0c33..dfc2251ec 100644 --- a/tex/context/fonts/mkiv/minion-math.lfg +++ b/tex/context/fonts/mkiv/minion-math.lfg @@ -39,9 +39,12 @@ return { -- DisplayOperatorMinHeight = 1900, -- 1250 in font -- AccentSuperscriptDrop = 100, -- AccentSuperscriptPercent = 20, - PrimeRaisePercent = 50, -- 50 default - PrimeRaiseComposedPercent = 25, -- 25 default - -- PrimeShiftUp = 0, + SubscriptShiftDown = 200, -- 250 in font + SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- 1.5* in math-act + -- PrimeRaisePercent = 50, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 25, -- set to 0 in math-act + PrimeShiftUp = "1.15*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.15*SuperscriptShiftUp", -- PrimeBaselineDropMax = 0, -- RadicalKernAfterExtensible = 100, -- 0 default -- RadicalKernBeforeExtensible = 100, -- 0 default @@ -65,6 +68,38 @@ return { presets.moveitalics { correct = true, letters = true }, presets.moveintegrals { factor = 1.3 }, presets.wipeitalics { }, + + { + tweak = "kerns", + list = { + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x002F.variants.*"] = { topleft = -0.2, bottomright = -0.2 }, + -- No! + -- [0x0028] = { topleft = -0.1, bottomleft = -0.1 }, -- left parenthesis + -- [0x0029] = { topright = -0.1, bottomright = -0.1, all = true }, -- right parenthesis + -- + [0x007D] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants + ["0x7D.variants.*"] = { topright = -0.10, bottomright = -0.10 }, -- right brace variants + ["0x7D.parts.top"] = { topright = -0.10, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.10 }, -- right brace bottom + [0x0029] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants + ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right parenthesis variants + ["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom + [0x221A] = { topright = 0.2, bottomright = 0.2 }, -- radical + ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 }, + ["0x221A.parts.top"] = { topright = 0.2, }, + ["0x221A.parts.bottom"] = { bottomright = 0.2 }, + [0x27E9] = { topright = -0.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + -- Keep as example. not needed in cambria (after all it is the reference): + [0x2A0C] = { bottomright = -0.1 }, -- iiiint does not have any ic + }, + }, + + { tweak = "simplifykerns", }, @@ -96,8 +131,8 @@ return { }, { tweak = "fixprimes", - factor = 0.95, - scale = 0.9, + factor = 1, + -- scale = 0.9, }, -- { -- tweak = "checkspacing", @@ -115,6 +150,9 @@ return { tweak = "addfourier", variant = 1, }, + { + tweak = "addprimed", + }, -- this is the mkiv section { tweak = "emulatelmtx", diff --git a/tex/context/fonts/mkiv/modern-math.lfg b/tex/context/fonts/mkiv/modern-math.lfg index 509e5a7da..4c433702c 100644 --- a/tex/context/fonts/mkiv/modern-math.lfg +++ b/tex/context/fonts/mkiv/modern-math.lfg @@ -26,14 +26,22 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 60, - PrimeRaiseComposedPercent = 15, - -- SubSuperscriptGapMin = 160, -- 160 in font - SuperscriptBaselineDropMax = 250, -- 250 in font - -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font - -- SuperscriptBottomMin = 108, -- 108 in font - SuperscriptShiftUp = 363, -- 363 in font - SuperscriptShiftUpCramped = 89, -- 289 in font + -- SubSuperscriptGapMin = 160, -- 160 in font (4*ruleheight) + -- SubscriptBaselineDropMin = 50, -- 200 in font (multiplied by 0.59999/2.39868) + SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm) + SubscriptShiftDownWithSuperscript = 247, -- relates to the previous one (see math-act) + -- SubscriptTopMax = 344, -- 344 in font .8 exheight + -- SuperscriptBaselineDropMax = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) 0 means: align the baseline of the superscript at the (top) + SuperscriptBaselineDropMax = 0.6*431, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) + SubscriptBaselineDropMin = 0.1*431, -- 200 in font + -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font .8 exheight + -- SuperscriptBottomMin = 108, -- 108 in font .25 exheight + SuperscriptShiftUp = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413) + SuperscriptShiftUpCramped = 413, -- 289 in font (no distinction, old TeX) + PrimeShiftUp = "1.1*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.1*SuperscriptShiftUp", + -- PrimeRaisePercent = 0, + -- PrimeRaiseComposedPercent = 25, }, tweaks = { aftercopying = { @@ -53,7 +61,7 @@ return { presets.fallbacks { }, presets.moveitalics { correct = true }, presets.moveitalics { correct = true, letters = true }, - presets.moveintegrals { factor = 1.4 }, + presets.moveintegrals { factor = 1.4, icfactor = 0.8 }, -- the icfactor is due to the very slanted integral. presets.wipeanchors { }, presets.wipeitalics { }, -- these will become moveanchors @@ -279,6 +287,8 @@ return { [0x1D4B4] = { bottomright = -0.18, }, -- script Y [0x1D4B5] = { bottomright = -0.05, }, -- script Z -- + [0x00393] = { bottomright = -0.20, }, -- upright Gamma + -- ["0x7D.parts.top"] = { topright = -0.25 }, -- right brace top ["0x7D.parts.bottom"] = { bottomright = -0.25 }, -- right brace bottom ["0x7D.variants.*"] = { topright = -0.25, bottomright = -0.25 }, -- right brace variants @@ -376,9 +386,9 @@ return { }, { tweak = "fixprimes", - factor = 1.05, + factor = 0.825, -- smaller = true, - scale = 0.9, + -- scale = 1, -- fake = 0.6, }, { @@ -411,6 +421,9 @@ return { variant = 1, }, { + tweak = "addprimed", + }, + { tweak = "addequals", }, -- { diff --git a/tex/context/fonts/mkiv/newcomputermodern-math.lfg b/tex/context/fonts/mkiv/newcomputermodern-math.lfg index 2e0c3169d..bf818b077 100644 --- a/tex/context/fonts/mkiv/newcomputermodern-math.lfg +++ b/tex/context/fonts/mkiv/newcomputermodern-math.lfg @@ -70,6 +70,19 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) + -- Borrow values from lm: + -- SubSuperscriptGapMin = 160, -- 160 in font (4*ruleheight) + SubscriptBaselineDropMin = 50, -- 200 in font (multiplied by 0.59999/2.39868) + SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm) + SubscriptShiftDownWithSuperscript = 247, -- relates to the previous one (see math-act) + -- SubscriptTopMax = 344, -- 344 in font .8 exheight + SuperscriptBaselineDropMax = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) + -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font .8 exheight + -- SuperscriptBottomMin = 108, -- 108 in font .25 exheight + SuperscriptShiftUp = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413) + SuperscriptShiftUpCramped = 413, -- 289 in font (no distinction, old TeX) + PrimeShiftUp = "1.1*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.1*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -83,13 +96,36 @@ return { -- nothing yet }, }, - -- { - -- tweak = "fixprimes", - -- factor = 0.85, - -- smaller = true, - -- scale = 0.70, - -- fake = 0.6, - -- }, + { + tweak = "fixprimes", + factor = 0.825, + smaller = true, + -- scale = 0.70, + fake = 0.6, + }, + { + tweak = "kerns", + list = { + [0x0002F] = { topleft = -0.2, bottomright = -0.2 }, -- solidus + -- + [0x00393] = { bottomright = -0.20, }, -- upright Gamma + -- + ["0x7D.parts.top"] = { topright = -0.25 }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.25 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.25, bottomright = -0.25 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.3, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.3 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.25, bottomright = -0.25 }, -- right parenthesis variants + ["0x221A.parts.top"] = { topright = 0.2, }, -- right radical top + ["0x221A.parts.bottom"] = { bottomright = 0.2 }, -- right radical bottom + ["0x221A.variants.*"] = { topright = 0.2, bottomright = 0.2 }, -- right radical variants + [0x27E9] = { topright = -0.2, bottomright = -0.2 }, -- angles + ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + [0x27EB] = { topright = -0.2, bottomright = -0.2 }, + ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + + }, + }, { tweak = "checkspacing", }, @@ -105,6 +141,13 @@ return { { tweak = "addrules", }, + { + tweak = "addfourier", + variant = 1, + }, + { + tweak = "addprimed", + }, }, }, bigs = { diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg index 8c60759ab..4df58ad3b 100644 --- a/tex/context/fonts/mkiv/pagella-math.lfg +++ b/tex/context/fonts/mkiv/pagella-math.lfg @@ -28,10 +28,15 @@ return { 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 + SuperscriptShiftUp = 386, -- 354 in font + SubscriptShiftDown = 200, -- 232 in font + SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- 1.5* in math-act + -- PrimeRaisePercent = 75, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act + PrimeShiftUp = "1.3*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.3*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -41,9 +46,10 @@ return { }, { tweak = "fixprimes", - factor = 0.9, + -- factor = 0.7, + factor = 0.8, -- smaller = true, - scale = 0.9, + -- scale = 1, -- fake = 0.65, }, { @@ -190,6 +196,8 @@ return { [0x27EB] = { topright = -0.2, bottomright = -0.2 }, ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 }, -- + [0x00393] = { bottomright = -0.20, }, -- upright Gamma + -- ["0x222B.parts.bottom"] = { bottomright = -0.20 }, -- int ["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint ["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint @@ -238,6 +246,9 @@ return { variant = 1, }, { + tweak = "addprimed", + }, + { tweak = "kernpairs", list = { -- beware: we kept the italic correction in spite of punctuation class diff --git a/tex/context/fonts/mkiv/schola-math.lfg b/tex/context/fonts/mkiv/schola-math.lfg index 8666690da..d1711bce0 100644 --- a/tex/context/fonts/mkiv/schola-math.lfg +++ b/tex/context/fonts/mkiv/schola-math.lfg @@ -25,8 +25,11 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1333 in font - -- PrimeRaisePercent = 50, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + -- PrimeRaisePercent = 50, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act + PrimeShiftUp = "1.35*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.35*SuperscriptShiftUp", + -- Can be improved: Smaller script and scriptscript, modified SuperShiftUp and SubShiftDown, ... }, tweaks = { aftercopying = { @@ -36,9 +39,9 @@ return { }, { tweak = "fixprimes", - scale = 0.85, + -- scale = 0.95, -- smaller = true, - factor = 1, + factor = 0.74, }, { tweak = "addmirrors", @@ -176,6 +179,9 @@ return { -- scale = 1.25, variant = 1, }, + { + tweak = "addprimed", + }, -- this is the mkiv section { tweak = "emulatelmtx", diff --git a/tex/context/fonts/mkiv/stixtwo-math.lfg b/tex/context/fonts/mkiv/stixtwo-math.lfg index 8e5489830..dadc70067 100644 --- a/tex/context/fonts/mkiv/stixtwo-math.lfg +++ b/tex/context/fonts/mkiv/stixtwo-math.lfg @@ -42,8 +42,10 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1800 in font - PrimeRaisePercent = 75, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + -- PrimeRaisePercent = 75, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act + PrimeShiftUp = "1.3*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.3*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -53,9 +55,7 @@ return { }, { tweak = "fixprimes", - scale = 1, - -- smaller = true, - factor = 1, + factor = 0.84, }, { tweak = "addmirrors", @@ -82,11 +82,11 @@ return { presets.moderntocalligraphic { }, presets.eulertocalligraphic { }, presets.xitsarabic { rscale = 0.95 }, - presets.fallbacks { }, + presets.fallbacks { }, presets.moveitalics { correct = true }, - presets.moveitalics { correct = true, letters = true }, + presets.moveitalics { correct = true, letters = true }, presets.moveintegrals { }, - presets.wipeitalics { }, + presets.wipeitalics { }, { tweak = "simplifykerns", }, @@ -216,6 +216,9 @@ return { variant = 1, }, { + tweak = "addprimed", + }, + { tweak = "addparts", list = { [0x21F4] = { diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg index cd4536b55..cff3090a9 100644 --- a/tex/context/fonts/mkiv/termes-math.lfg +++ b/tex/context/fonts/mkiv/termes-math.lfg @@ -24,8 +24,15 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 60, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + -- ScriptPercentScaleDown = 70, -- 74 in font (set in typescript) + -- ScriptScriptPercentScaleDown = 50, -- 50 in font (set in typescript) + SuperscriptShiftUp = 310, -- 339 + SubscriptShiftDown = 200, -- 222 + SubscriptShiftDownWithSuperscript = "1.4*SubscriptShiftDown", -- 1.5* in math-act + -- PrimeRaisePercent = 60, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 10, -- set to 0 in math-act + PrimeShiftUp = "1.35*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.35*SuperscriptShiftUp", }, tweaks = { aftercopying = { @@ -35,9 +42,9 @@ return { }, { tweak = "fixprimes", - scale = 0.85, + -- scale = 0.9, -- smaller = true, - factor = 0.95, + factor = 0.76, }, { tweak = "addmirrors", @@ -71,6 +78,8 @@ return { [0x27EB] = { topright = -0.1, bottomright = -0.1 }, ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- + [0x00393] = { bottomright = -0.20, }, -- upright Gamma + -- ["0x222B.parts.bottom"] = { bottomright = -0.20 }, -- int ["0x222C.parts.bottom"] = { bottomright = -0.15 }, -- iint ["0x222D.parts.bottom"] = { bottomright = -0.10 }, -- iiint diff --git a/tex/context/fonts/mkiv/type-imp-dejavu.mkiv b/tex/context/fonts/mkiv/type-imp-dejavu.mkiv index d6fe406fb..49b788a73 100644 --- a/tex/context/fonts/mkiv/type-imp-dejavu.mkiv +++ b/tex/context/fonts/mkiv/type-imp-dejavu.mkiv @@ -45,8 +45,8 @@ \stoptypescript \starttypescript [\s!math] [dejavu,dejavu-nt,dejavu-condensed] - \checkedmapfontsize[\typescripttwo][\s!script] [.80] - \checkedmapfontsize[\typescripttwo][\s!scriptscript][.65] + \checkedmapfontsize[\typescripttwo][\s!script] [.70]%.80 + \checkedmapfontsize[\typescripttwo][\s!scriptscript][.55]%.65 \stoptypescript \starttypescript [\s!math] [dejavu] [\s!name] diff --git a/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv b/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv index f62855a59..c10ffa54e 100644 --- a/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv +++ b/tex/context/fonts/mkiv/type-imp-modernlatin.mkiv @@ -83,9 +83,9 @@ \stoptypescript \starttypescript [\s!math] [modernlatin,modern-latin,lessmodernlatin,less-modern-latin] - \loadfontgoodies[lm] - \definefontsynonym [MathRoman] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math,lm-math-regular,mathextra},\s!goodies=lm] - \definefontsynonym [MathRomanBold] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math,lm-math-bold,mathextra},\s!goodies=lm] + \loadfontgoodies[modern-math] + \definefontsynonym [MathRoman] [\v!file:latinmodern-math.otf] [\s!features={\s!math\mathsizesuffix,lm-math,lm-math-regular,mathextra},\s!goodies=modern-math] + \definefontsynonym [MathRomanBold] [\v!file:latinmodern-math.otf] [\s!features={\s!math\mathsizesuffix,lm-math,lm-math-bold,mathextra},\s!goodies=modern-math] \stoptypescript \starttypescript [modern-latin,modernlatin,less-modern-latin,lessmodernlatin] diff --git a/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv b/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv index 73f7c4dbf..65a84ec5f 100644 --- a/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv +++ b/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv @@ -49,8 +49,8 @@ \starttypescript [\s!math][newcomputermodern] [\s!name] % \loadfontgoodies[newcomputermodern-math] ,\s!goodies=newcomputermodern-math - \definefontsynonym[\s!MathRoman] [\s!file:newcmmath-regular][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=lm] - \definefontsynonym[\s!MathRomanBold][\s!file:newcmmath-regular][\s!features={\s!math\mathsizesuffix,newcomputermodern-math-bold,mathextra},\s!goodies=lm] + \definefontsynonym[\s!MathRoman] [\s!file:newcmmath-regular][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=newcomputermodern-math] + \definefontsynonym[\s!MathRomanBold][\s!file:newcmmath-regular][\s!features={\s!math\mathsizesuffix,newcomputermodern-math-bold,mathextra},\s!goodies=newcomputermodern-math] \stoptypescript \starttypescript [\s!serif] [newcomputermodern-book] [\s!name] @@ -79,8 +79,8 @@ \starttypescript [\s!math][newcomputermodern-book] [\s!name] % \loadfontgoodies[newcomputermodern-math] ,\s!goodies=newcomputermodern-math - \definefontsynonym[\s!MathRoman] [\s!file:newcmmath-book][\s!features={\s!math\mathsizesuffix,newcm-mathextra,mathextra},\s!goodies=lm] - \definefontsynonym[\s!MathRomanBold][\s!file:newcmmath-book][\s!features={\s!math\mathsizesuffix,newcm-mathextra,newcomputermodern-math-bold,mathextra},\s!goodies=lm] + \definefontsynonym[\s!MathRoman] [\s!file:newcmmath-book][\s!features={\s!math\mathsizesuffix,newcm-mathextra,mathextra},\s!goodies=newcomputermodern-math] + \definefontsynonym[\s!MathRomanBold][\s!file:newcmmath-book][\s!features={\s!math\mathsizesuffix,newcm-mathextra,newcomputermodern-math-bold,mathextra},\s!goodies=newcomputermodern-math] \stoptypescript \starttypescript[newcomputermodern,newcomputermodern-book] diff --git a/tex/context/fonts/mkiv/type-imp-texgyre.mkiv b/tex/context/fonts/mkiv/type-imp-texgyre.mkiv index 87009f11e..a3f3952c7 100644 --- a/tex/context/fonts/mkiv/type-imp-texgyre.mkiv +++ b/tex/context/fonts/mkiv/type-imp-texgyre.mkiv @@ -281,8 +281,8 @@ \starttypescriptcollection[texgyre-math-termes] \starttypescript [\s!math][termes,termes-nt,times][\s!all] - \checkedmapfontsize[\typescripttwo][\s!script] [.74] - \checkedmapfontsize[\typescripttwo][\s!scriptscript][.55] + \checkedmapfontsize[\typescripttwo][\s!script] [.70]%.74 + \checkedmapfontsize[\typescripttwo][\s!scriptscript][.50]%.55 \stoptypescript \starttypescript [\s!math][termes,times][\s!all] \definefontsynonym[\s!MathRoman] [file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes:mathextra,mathextra},\s!goodies=termes-math] @@ -335,8 +335,8 @@ \starttypescriptcollection[texgyre-math-bonum] \starttypescript [\s!math][bonum,bonum-nt,bookman][\s!all] - \checkedmapfontsize[\typescripttwo][\s!script] [.77] - \checkedmapfontsize[\typescripttwo][\s!scriptscript][.60] + \checkedmapfontsize[\typescripttwo][\s!script] [.70]%.77 + \checkedmapfontsize[\typescripttwo][\s!scriptscript][.55]%.60 \stoptypescript \starttypescript [\s!math][bonum,bookman][\s!all] \definefontsynonym[\s!MathRoman] [file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum:mathextra,mathextra},\s!goodies=bonum-math] diff --git a/tex/context/fonts/mkiv/xcharter-math.lfg b/tex/context/fonts/mkiv/xcharter-math.lfg index be09720d1..c91ea6fa7 100644 --- a/tex/context/fonts/mkiv/xcharter-math.lfg +++ b/tex/context/fonts/mkiv/xcharter-math.lfg @@ -22,13 +22,17 @@ return { -- DelimiterPercent = 90, -- DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (one size) + SubscriptShiftDown = 200, -- 300 in font + SubscriptShiftDownWithSuperscript = "1.3*SubscriptShiftDown", -- 1.5* in math-act + PrimeShiftUp = "1.2*SuperscriptShiftUp", + PrimeShiftUpCramped = "1.2*SuperscriptShiftUp", }, tweaks = { aftercopying = { { tweak = "fixprimes", - factor = 0.8, - scale = 1, + factor = 0.92, + -- scale = 1, }, { tweak = "addmirrors", @@ -70,6 +74,8 @@ return { ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, [0x27EB] = { topright = -0.1, bottomright = -0.1 }, ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + -- + [0x00393] = { bottomright = -0.20, }, -- upright Gamma }, }, { |