diff options
Diffstat (limited to 'tex/context/fonts/mkiv')
27 files changed, 1679 insertions, 1463 deletions
diff --git a/tex/context/fonts/mkiv/asana-math.lfg b/tex/context/fonts/mkiv/asana-math.lfg index 934f9e0f0..379dd014f 100644 --- a/tex/context/fonts/mkiv/asana-math.lfg +++ b/tex/context/fonts/mkiv/asana-math.lfg @@ -30,6 +30,8 @@ -- local integral_top = { topright = 0.05 } -- local integral_bottom = { bottomright = -0.25 } +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets return { name = "asana-math", @@ -49,7 +51,7 @@ return { -- StretchStackGapAboveMin = less, -- StretchStackGapBelowMin = less, -- StretchStackTopShiftUp = less, - NoLimitSupFactor = -200, + NoLimitSupFactor = 200, NoLimitSubFactor = 1200, AccentBaseDepth = 300, RadicalDegreeBottomRaisePercent = 70, @@ -66,6 +68,12 @@ return { message = "this font is not supported", }, { + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 1 }, + presets.mathrsfscript { rscale = 1 }, + presets.mathxitsarabic { rscale = 0.95 }, + { tweak = "dimensions", list = { -- nothing yet @@ -103,7 +111,10 @@ return { { tweak = "fixellipses", }, - + { + tweak = "setoptions", + set = { "ignorekerndimensions" } + }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg index c09b55c20..508293f19 100644 --- a/tex/context/fonts/mkiv/bonum-math.lfg +++ b/tex/context/fonts/mkiv/bonum-math.lfg @@ -17,10 +17,12 @@ 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 } -local integral_bottom = { bottomright = -0.30 } +local integral_variants = { bottomright = -0.20 } +local integral_top = { topright = 0.05 } +local integral_bottom = { bottomright = -0.30 } + +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets return { name = "bonum-math", @@ -34,19 +36,19 @@ return { NoLimitSubFactor = 900, AccentTopShiftUp = -15, FlattenedAccentTopShiftUp = -15, - -- AccentExtendMargin = 50, + -- AccentExtendMargin = 50, AccentBaseDepth = 50, RadicalDegreeBottomRaisePercent = 60, - RadicalRuleThickness = 66, -- 72 in font + RadicalRuleThickness = 66, -- 72 in font DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1900, -- 1250 in font -- AccentSuperscriptDrop = 100, - -- AccentSuperscriptPercent = 20, - -- PrimeRaisePercent = 50, - PrimeRaiseComposedPercent = 0, - -- PrimeShiftUp = 0, - -- PrimeBaselineDropMax = 0, + -- AccentSuperscriptPercent = 20, + -- PrimeRaisePercent = 50, + PrimeRaiseComposedPercent = 0, + -- PrimeShiftUp = 0, + -- PrimeBaselineDropMax = 0, }, tweaks = { aftercopying = { @@ -55,125 +57,79 @@ return { expected = "Version 1.005", }, { + tweak = "fixprimes", + -- scale = 0.8, + -- smaller = true, + factor = 1,--1.1 + }, + { + tweak = "addmirrors", + }, + { + tweak = "replacealphabets", + -- feature = "mathbeta", -- we always replace + list = { + { + source = { first = 0x003B1 }, + filename = "texgyrebonummath-companion.otf", + }, + { + source = { first = 0x1D6FC }, + filename = "texgyrebonummath-companion.otf", + }, + }, + }, + presets.matheulercalligraphic { rscale = 0.98 }, + presets.mathrsfscript { rscale = 0.98 }, + presets.mathxitsarabic { rscale = 1 }, + presets.moveitalics { correct = true }, + { + -- For some 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", -- some remain + }, + }, + { + -- tweak = "topaccents", + list = { + [0x1D453] = 0.7, -- f + }, + }, + { + tweak = "limits", + list = { + [0x0222B] = 1.5, + }, + }, + { + -- We need to check these, are the tweaks necessary or not? tweak = "dimensions", list = { - [0x00393] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \Gamma - [0x00394] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \Delta - [0x00398] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Theta - [0x0039B] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Lambda - [0x0039E] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Xi - [0x003A0] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Pi - [0x003A3] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Sigma - [0x003A5] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Upsilon - [0x003A6] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Phi - [0x003A8] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Psi - [0x003A9] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Omega - [0x02202] = { xoffset = -0.075, width = 0.825, italic = 0 }, -- \partial - [0x1D43A] = { xoffset = -0.1, width = 1, italic = 0 }, -- G - [0x1D442] = { xoffset = -0.1, width = 1, italic = 0 }, -- O - [0x1D444] = { xoffset = -0.05, width = 1.025, italic = 0 }, -- Q - [0x1D44E] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.8 }, -- a - [0x1D44F] = { xoffset = -0.05, width = 1.1, italic = 0 }, -- b - [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, 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 - [0x1D457] = { xoffset = 0.6, width = 1.7, italic = 0.45 }, -- j - [0x1D458] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 1.15 }, -- k - [0x1D459] = { xoffset = -0.15, width = 1.1, italic = 0, anchor = 0.8 }, -- l - [0x1D45A] = { xoffset = -0.05, width = 1, italic = 0 }, -- m - [0x1D45B] = { xoffset = -0.1, width = 1, italic = 0, anchor = 0.9 }, -- n - [0x1D45C] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- o - [0x1D45D] = { xoffset = 0, width = 1.05, italic = 0 }, -- p - [0x1D45E] = { xoffset = -0.05, width = 1.05, italic = 0, anchor = 0.9 }, -- q - [0x1D45F] = { xoffset = -0.1, width = 1.15, italic = 0, anchor = 0.9 }, -- r - [0x1D460] = { xoffset = -0.05, width = 1.05, italic = 0 }, -- s - [0x1D461] = { xoffset = -0.15, width = 1.2, italic = 0, anchor = 0.9 }, -- t - [0x1D462] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 0.85 }, -- u - [0x1D463] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 0.85 }, -- v - [0x1D464] = { xoffset = -0.05, width = 1.05, italic = 0, anchor = 0.95 }, -- w - [0x1D465] = { xoffset = 0, width = 1.175, italic = 0, anchor = 0.9 }, -- x - [0x1D466] = { xoffset = -0.05, width = 1.05, italic = 0 }, -- y - [0x1D467] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- z - [0x1D6FC] = { xoffset = -0.075, width = 0.825, italic = 0 }, -- \alpha - [0x1D6FD] = { xoffset = 0, width = 0.9, italic = 0, anchor = 1.05 }, -- \beta - [0x1D6FE] = { xoffset = -0.075, width = 0.85, italic = 0.05, anchor = 1.05 }, -- \gamma - [0x1D6FF] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \delta - [0x1D716] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \epsilon - [0x1D700] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \varepsilon - [0x1D701] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \zeta - [0x1D702] = { xoffset = -0.1, width = 0.85, italic = 0, anchor = 1.05 }, -- \eta - [0x1D703] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \theta - [0x1D717] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \vartheta - [0x1D704] = { xoffset = -0.1, width = 0.9, italic = 0, anchor = 1.05 }, -- \iota - [0x1D705] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \kappa - [0x1D706] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.05 }, -- \lambda - [0x1D707] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \mu - [0x1D708] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \nu - [0x1D709] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \xi - [0x1D70A] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \omicron - [0x1D70B] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \pi - [0x1D71B] = { xoffset = -0.07, width = 0.85, italic = 0 }, -- \varpi - [0x1D70C] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \rho - [0x1D71A] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \varrho - [0x1D70D] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.02 }, -- \varsigma - [0x1D70E] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \sigma - [0x1D70F] = { xoffset = -0.08, width = 0.85, italic = 0, anchor = 1.05 }, -- \tau - [0x1D710] = { xoffset = -0.08, width = 0.85, italic = 0, anchor = 1.03 }, -- \upsilon - [0x1D719] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \phi - [0x1D711] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.02 }, -- \varphi - [0x1D712] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \chi - [0x1D713] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \psi - [0x1D714] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \omega - -- [0x1D718] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \varkappa - [0x1D719] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \phi - [0x1D41B] = { xoffset = 0, width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright b - [0x1D41D] = { xoffset = 0, width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase upright d - [0x1D41F] = { xoffset = 0, width = 1.25, italic = 0, anchor = 0.8 }, -- bold lowercase upright f - [0x1D420] = { xoffset = 0, width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase upright g - [0x1D421] = { xoffset = 0, width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright h - [0x1D424] = { xoffset = 0, width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright k - [0x1D425] = { xoffset = 0, width = 1, italic = 0, anchor = 0.75 }, -- bold lowercase upright l - [0x1D42A] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright q - [0x1D42B] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright r - [0x1D42C] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright s - -- [0x1D482] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic a - -- [0x1D483] = { xoffset = 0, width = 1, italic = 0, anchor = 1.1 }, -- bold lowercase italic b - -- [0x1D484] = { xoffset = 0, width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic c - -- [0x1D485] = { xoffset = 0, width = 1, italic = 0, anchor = 0.75 }, -- bold lowercase italic d - -- [0x1D486] = { xoffset = 0, width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic e - -- [0x1D487] = { xoffset = 0, width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic f - -- [0x1D488] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic g - -- [0x1D489] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- bold lowercase italic h - -- [0x1D48A] = { xoffset = 0, width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase italic i - -- [0x1D48B] = { xoffset = 0, width = 1, italic = 0, anchor = 0.8 }, -- bold lowercase italic j - -- [0x1D48C] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- bold lowercase italic k - -- [0x1D48D] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic l - -- [0x1D492] = { xoffset = 0, width = 1, italic = 0, anchor = 0.85 }, -- bold lowercase italic q - -- [0x1D493] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic r - -- [0x1D497] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic v - -- [0x1D499] = { xoffset = 0, width = 1.1, italic = 0, anchor = 0.9 }, -- bold lowercase italic x - -- [0x1D49A] = { xoffset = 0, width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic y - -- [0x1D49B] = { xoffset = 0, width = 1, italic = 0, anchor = 1.1 }, -- bold lowercase italic z - [0x1D743] = { xoffset = 0, width = 1, italic = 0, anchor = 1.7 }, -- bold lowercase italic greek xi - [0x1D435] = { anchor = 1.05 }, -- italic B - [0x1D436] = { xoffset = -0.1, anchor = 0.7 }, -- italic C - [0x1D437] = { anchor = 1.25 }, -- italic D - [0x1D43A] = { anchor = 0.8 }, -- italic G - [0x1D442] = { anchor = 0.85 }, -- italic O - [0x1D443] = { anchor = 1.1 }, -- italic P - [0x1D444] = { anchor = 0.85 }, -- italic Q - [0x1D445] = { xoffset = -0.025, width = 1.05, anchor = 1.05 }, -- italic R - [0x1D446] = { xoffset = -0.05, anchor = 0.85 }, -- italic S - [0x1D447] = { xoffset = -0.05, width = 1.05, italic = 0.7, anchor = 0.9, }, -- italic T - [0x1D448] = { xoffset = -0.125, italic = 0.3, anchor = 0.9, }, -- italic U - [0x1D449] = { xoffset = -0.125, italic = 0.3, anchor = 0.9, }, -- italic V - [0x1D44A] = { xoffset = -0.075, italic = 0.3, anchor = 0.9, }, -- italic W - [0x1D44C] = { xoffset = -0.075, width = 1.1, italic = 0.35, anchor = 0.9, }, -- italic Y - ["lowercasefraktur"] = { width = 1.25, extend = 1.25, @@ -195,71 +151,28 @@ return { { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - bottomright = -0.2, - }, - ["0x2F.variants.*"] = { - topleft = -0.2, - bottomright = -0.2, - }, - -- [0x28] = { -- left parenthesis. No! - -- topleft = -0.1, - -- bottomleft = -0.1, - -- }, - -- [0x29] = { -- right parenthesis. No! - -- topright = -0.1, - -- bottomright = -0.1, - -- all = true, - -- }, - [0x7D] = { - topright = -0.05, - bottomright = -0.05, - }, -- right brace variants - ["0x7D.variants.*"] = { - topright = -0.05, - bottomright = -0.05, - }, -- right brace variants - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - [0x29] = { - topright = -0.1, - bottomright = -0.1, - }, -- right parenthesis variants - ["0x29.variants.*"] = { - topright = -0.1, - bottomright = -0.1, - }, -- 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, - }, - ["0x221A.variants.*"] = { - topright = 0.2, - bottomright = 0.2, - }, - ["0x221A.parts.top"] = { - topright = 0.2, - }, - ["0x221A.parts.bottom"] = { - bottomright = 0.2, - }, - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.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.05, bottomright = -0.05 }, -- right brace variants + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- 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 -- radical + [0x221A] = { topright = 0.2, bottomright = 0.2 }, + ["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.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- [0x222B] = integral_variants, ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, [0x222C] = integral_variants, ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, @@ -270,10 +183,8 @@ return { [0x2231] = integral_variants, ["0x2231.variants.*"] = integral_variants, ["0x2231.parts.top"] = integral_top, ["0x2231.parts.bottom"] = integral_bottom, [0x2232] = integral_variants, ["0x2232.variants.*"] = integral_variants, ["0x2232.parts.top"] = integral_top, ["0x2232.parts.bottom"] = integral_bottom, [0x2233] = integral_variants, ["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. @@ -321,184 +232,144 @@ return { tweak = "copyaccents", }, -- So far for the accents. - { - -- For upright alphabets, we unset the anchor. - -- This means that accents are placed - -- centered over the character. - -- Should be on top - tweak = "wipeanchors", - 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", - "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", -- some remain + -- For upright alphabets, we unset the anchor. This means that accents are placed + -- centered over the character. Should be on top. + tweak = "wipeanchors", + 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", + "uppercasesansserifbold", + "uppercasesansserifnormal", }, - }, - { - -- This one fakes margins to get larger/smaller accents - -- with for example \widetilde. + }, + { + -- This one fakes margins to get larger/smaller accents with for example the + -- \widetilde. tweak = "margins", list = { - [0x1D7DC] = { left = -.1, right = -.1 }, -- doublestruck 4 - - [0x1D712] = { left = -.1, right = -.1 }, -- italic chi - [0x1D713] = { left = -.1, right = -.1 }, -- italic psi - [0x1D714] = { left = -.1, right = -.1 }, -- italic omega - - [0x003B1] = { left = -.1, right = -.1 }, -- upfight alpha - [0x003B3] = { left = -.1, right = -.1 }, -- upfight gamma - [0x003BA] = { left = -.1, right = -.1 }, -- upfight kappa - [0x003BC] = { left = -.1, right = -.1 }, -- upfight mu - [0x003C0] = { left = -.1, right = -.1 }, -- upfight pi - [0x003C3] = { left = -.1, right = -.1 }, -- upfight sigma - [0x003C5] = { left = -.1, right = -.1 }, -- upfight upsilon - [0x003C6] = { left = -.1, right = -.1 }, -- upfight phi - [0x003C8] = { left = -.1, right = -.1 }, -- upfight psi - [0x003C9] = { left = -.1, right = -.1 }, -- upfight omega + [0x1D7DC] = { left = -.1, right = -.1 }, -- doublestruck 4 + + [0x1D712] = { left = -.1, right = -.1 }, -- italic chi + [0x1D713] = { left = -.1, right = -.1 }, -- italic psi + [0x1D714] = { left = -.1, right = -.1 }, -- italic omega + + [0x003B1] = { left = -.1, right = -.1 }, -- upfight alpha + [0x003B3] = { left = -.1, right = -.1 }, -- upfight gamma + [0x003BA] = { left = -.1, right = -.1 }, -- upfight kappa + [0x003BC] = { left = -.1, right = -.1 }, -- upfight mu + [0x003C0] = { left = -.1, right = -.1 }, -- upfight pi + [0x003C3] = { left = -.1, right = -.1 }, -- upfight sigma + [0x003C5] = { left = -.1, right = -.1 }, -- upfight upsilon + [0x003C6] = { left = -.1, right = -.1 }, -- upfight phi + [0x003C8] = { left = -.1, right = -.1 }, -- upfight psi + [0x003C9] = { left = -.1, right = -.1 }, -- upfight omega -- Greek lowercase sans (bold, italic) can be improved - [0x1D451] = { left = -.1, right = -.1 }, -- italic d - [0x1D453] = { left = -.1, right = -.1 }, -- italic f + [0x1D451] = { left = -.1, right = -.1 }, -- italic d + [0x1D453] = { left = -.1, right = -.1 }, -- italic f - [0x00394] = { left = .1, right = .1 }, -- upfight Delta - [0x003A3] = { left = .1, right = .1 }, -- upfight Sigma + [0x00394] = { left = .1, right = .1 }, -- upfight Delta + [0x003A3] = { left = .1, right = .1 }, -- upfight Sigma - -- [0x0004A] = { left = .1, right = .1 }, -- J - [0x00046] = { left = .1, right = .1 }, -- F - [0x0004C] = { left = .1, right = .1 }, -- L - [0x00050] = { left = .1, right = .1 }, -- P - [0x00053] = { left = .1, right = .1 }, -- S - [0x00054] = { left = .1, right = .1 }, -- T - [0x0005A] = { left = .1, right = .1 }, -- Z + -- [0x0004A] = { left = .1, right = .1 }, -- J + [0x00046] = { left = .1, right = .1 }, -- F + [0x0004C] = { left = .1, right = .1 }, -- L + [0x00050] = { left = .1, right = .1 }, -- P + [0x00053] = { left = .1, right = .1 }, -- S + [0x00054] = { left = .1, right = .1 }, -- T + [0x0005A] = { left = .1, right = .1 }, -- Z [0x1D43D] = { left = -.1, right = -.1 }, -- italic J -- [0x1D448] = { left = -.05, right = -.05 }, -- italic U -- [0x1D449] = { left = -.05, right = -.05 }, -- italic V [0x1D44B] = { left = -.05, right = -.05 }, -- italic X - -- [0x1D487] = { left = -.2, right = -.2 }, -- bold italic f - -- [0x1D489] = { left = -.2, right = -.2 }, -- bold italic h - -- [0x1D496] = { left = -.1, right = -.1 }, -- bold italic u - -- [0x1D499] = { left = -.1, right = -.1 }, -- bold italic x - - -- [0x1D711] = { left = -.1, right = -.1 }, -- italic varphi - -- [0x1D713] = { left = -.1, right = -.1 }, -- italic psi - - -- [0x1D659] = { left = -.1, right = -.1 }, -- sans bold italic d - -- [0x1D65C] = { left = -.1, right = -.1 }, -- sans bold italic g - - -- [0x1D409] = { left = .1, right = .1 }, -- bold upright J - -- [0x1D412] = { left = .1, right = .1 }, -- bold upright S - - -- [0x1D509] = { left = .1, right = .1 }, -- fraktur F - -- [0x1D50C] = { left = .1, right = .1 }, -- fraktur I - -- [0x1D50D] = { left = .1, right = .1 }, -- fraktur J - -- [0x1D51D] = { left = .1, right = .1 }, -- fraktur Z - - -- [0x1D538] = { left = .1, right = .1 }, -- doublestruck A - -- [0x1D539] = { left = .1, right = .1 }, -- doublestruck B - -- [0x1D53C] = { left = .1, right = .1 }, -- doublestruck E - -- [0x1D53D] = { left = .1, right = .1 }, -- doublestruck F - -- [0x1D541] = { left = .1, right = .1 }, -- doublestruck J - -- [0x1D542] = { left = .1, right = .1 }, -- doublestruck K - -- [0x1D543] = { left = .1, right = .1 }, -- doublestruck L - -- [0x1D547] = { left = .1, right = .1 }, -- doublestruck P - -- [0x1D549] = { left = .1, right = .1 }, -- doublestruck R - -- [0x1D54A] = { left = .1, right = .1 }, -- doublestruck S - -- [0x1D54B] = { left = .1, right = .1 }, -- doublestruck T - -- [0x1D54D] = { left = .1, right = .1 }, -- doublestruck V - -- [0x1D550] = { left = .1, right = .1 }, -- doublestruck Y - - -- [0x1D506] = { left = .1, right = .1 }, -- fraktur C - - -- [0x00393] = { left = .1, right = .1 }, -- upfight Gamma - -- [0x00396] = { left = .1, right = .1 }, -- upfight Zeta - - -- [0x1D5D8] = { left = .1, right = .1 }, -- sans bold E - -- [0x1D5D9] = { left = .1, right = .1 }, -- sans bold F - -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope - -- [0x1D5DF] = { left = .1, right = .1 }, -- sans bold L - -- [0x1D5E6] = { left = .1, right = .1 }, -- sans bold S - - -- [0x1D61A] = { left = .1, right = .1 }, -- sans italic S - - -- [0x1D5A2] = { left = .1, right = .1 }, -- sans C - -- [0x1D5A4] = { left = .1, right = .1 }, -- sans E - -- [0x1D5A5] = { left = .1, right = .1 }, -- sans F - -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope - -- [0x1D5AF] = { left = .1, right = .1 }, -- sans P - -- [0x1D5B2] = { left = .1, right = .1 }, -- sans S - -- [0x1D5B9] = { left = .1, right = .1 }, -- sans Z - - -- [0x1D4A0] = { left = .1, right = .1 }, -- script E - -- [0x1D4AE] = { left = .1, right = .1 }, -- script S - -- [0x1D4B4] = { left = .1, right = .1 }, -- script Y + -- [0x1D487] = { left = -.2, right = -.2 }, -- bold italic f + -- [0x1D489] = { left = -.2, right = -.2 }, -- bold italic h + -- [0x1D496] = { left = -.1, right = -.1 }, -- bold italic u + -- [0x1D499] = { left = -.1, right = -.1 }, -- bold italic x + + -- [0x1D711] = { left = -.1, right = -.1 }, -- italic varphi + -- [0x1D713] = { left = -.1, right = -.1 }, -- italic psi + + -- [0x1D659] = { left = -.1, right = -.1 }, -- sans bold italic d + -- [0x1D65C] = { left = -.1, right = -.1 }, -- sans bold italic g + + -- [0x1D409] = { left = .1, right = .1 }, -- bold upright J + -- [0x1D412] = { left = .1, right = .1 }, -- bold upright S + + -- [0x1D509] = { left = .1, right = .1 }, -- fraktur F + -- [0x1D50C] = { left = .1, right = .1 }, -- fraktur I + -- [0x1D50D] = { left = .1, right = .1 }, -- fraktur J + -- [0x1D51D] = { left = .1, right = .1 }, -- fraktur Z + + -- [0x1D538] = { left = .1, right = .1 }, -- doublestruck A + -- [0x1D539] = { left = .1, right = .1 }, -- doublestruck B + -- [0x1D53C] = { left = .1, right = .1 }, -- doublestruck E + -- [0x1D53D] = { left = .1, right = .1 }, -- doublestruck F + -- [0x1D541] = { left = .1, right = .1 }, -- doublestruck J + -- [0x1D542] = { left = .1, right = .1 }, -- doublestruck K + -- [0x1D543] = { left = .1, right = .1 }, -- doublestruck L + -- [0x1D547] = { left = .1, right = .1 }, -- doublestruck P + -- [0x1D549] = { left = .1, right = .1 }, -- doublestruck R + -- [0x1D54A] = { left = .1, right = .1 }, -- doublestruck S + -- [0x1D54B] = { left = .1, right = .1 }, -- doublestruck T + -- [0x1D54D] = { left = .1, right = .1 }, -- doublestruck V + -- [0x1D550] = { left = .1, right = .1 }, -- doublestruck Y + + -- [0x1D506] = { left = .1, right = .1 }, -- fraktur C + + -- [0x00393] = { left = .1, right = .1 }, -- upfight Gamma + -- [0x00396] = { left = .1, right = .1 }, -- upfight Zeta + + -- [0x1D5D8] = { left = .1, right = .1 }, -- sans bold E + -- [0x1D5D9] = { left = .1, right = .1 }, -- sans bold F + -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope + -- [0x1D5DF] = { left = .1, right = .1 }, -- sans bold L + -- [0x1D5E6] = { left = .1, right = .1 }, -- sans bold S + + -- [0x1D61A] = { left = .1, right = .1 }, -- sans italic S + + -- [0x1D5A2] = { left = .1, right = .1 }, -- sans C + -- [0x1D5A4] = { left = .1, right = .1 }, -- sans E + -- [0x1D5A5] = { left = .1, right = .1 }, -- sans F + -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope + -- [0x1D5AF] = { left = .1, right = .1 }, -- sans P + -- [0x1D5B2] = { left = .1, right = .1 }, -- sans S + -- [0x1D5B9] = { left = .1, right = .1 }, -- sans Z + + -- [0x1D4A0] = { left = .1, right = .1 }, -- script E + -- [0x1D4AE] = { left = .1, right = .1 }, -- script S + -- [0x1D4B4] = { left = .1, right = .1 }, -- script Y }, }, { - tweak = "fixprimes", - -- scale = 0.8, - -- smaller = true, - factor = 1,--1.1 - }, - { tweak = "addprivates", -- list = { -- -- for specific parameters see act file @@ -531,6 +402,9 @@ return { list = { [0x3D] = { squeeze = .85, yoffset = .0975 } } }, { + -- Do we need these in the future? + -- Maybe a more general setup? + -- Maybe "reset llx" tweak = "kernpairs", list = { [mathematics.tweaks.subsets.acenorsuvxz] = { @@ -565,27 +439,23 @@ return { [0x1D45F] = { -- r [0x1D460] = -.1, -- s }, --- [mathematics.tweaks.subsets.acenorsuvxz] = { --- [mathematics.tweaks.subsets.acenorsuvxz] = 2, --- }, --- [0x1D452] = { --- [0x1D453] = -.05, --- [0x1D465] = -.3, --- }, --- [0x1D453] = { --- [0x1D453] = -.1, --- [0x1D454] = -.1, --- [0x1D465] = -.3, --- }, --- [0x1D465] = { --- [0x1D465] = .1, --- } - } + -- [mathematics.tweaks.subsets.acenorsuvxz] = { + -- [mathematics.tweaks.subsets.acenorsuvxz] = 2, + -- }, + -- [0x1D452] = { + -- [0x1D453] = -.05, + -- [0x1D465] = -.3, + -- }, + -- [0x1D453] = { + -- [0x1D453] = -.1, + -- [0x1D454] = -.1, + -- [0x1D465] = -.3, + -- }, + -- [0x1D465] = { + -- [0x1D465] = .1, + -- } + } }, - -- { - -- tweak = "fixanchors", - -- factor = .5, - -- }, { tweak = "addbars", advance = 0.275, @@ -619,3 +489,124 @@ return { -- \alpha is looking like an italic a. The one from Dejavu could perhaps be an alternative? -- No hvariants in 772 + + + + +-- From the dimension tweak: +-- [0x00393] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \Gamma +-- [0x00394] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \Delta +-- [0x00398] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Theta +-- [0x0039B] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Lambda +-- [0x0039E] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Xi +-- [0x003A0] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Pi +-- [0x003A3] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Sigma +-- [0x003A5] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \Upsilon +-- [0x003A6] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Phi +-- [0x003A8] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Psi +-- [0x003A9] = { xoffset = -0.05, width = 0.9, italic = 0 }, -- \Omega +-- [0x02202] = { xoffset = -0.075, width = 0.825, italic = 0 }, -- \partial +-- [0x1D43A] = { xoffset = -0.1, width = 1, italic = 0 }, -- G +-- [0x1D442] = { xoffset = -0.1, width = 1, italic = 0 }, -- O +-- [0x1D444] = { xoffset = -0.05, width = 1.025, italic = 0 }, -- Q +-- -- [0x1D44E] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.8 }, -- a +-- -- [0x1D44F] = { xoffset = -0.05, width = 1.1, italic = 0 }, -- b +-- -- [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, 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 +-- -- [0x1D457] = { xoffset = 0.6, width = 1.7, italic = 0.45 }, -- j +-- -- [0x1D458] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 1.15 }, -- k +-- -- [0x1D459] = { xoffset = -0.15, width = 1.1, italic = 0, anchor = 0.8 }, -- l +-- -- [0x1D45A] = { xoffset = -0.05, width = 1, italic = 0 }, -- m +-- -- [0x1D45B] = { xoffset = -0.1, width = 1, italic = 0, anchor = 0.9 }, -- n +-- -- [0x1D45C] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- o +-- -- [0x1D45D] = { width = 1.05, italic = 0 }, -- p +-- -- [0x1D45E] = { xoffset = -0.05, width = 1.05, italic = 0, anchor = 0.9 }, -- q +-- -- [0x1D45F] = { xoffset = -0.1, width = 1.15, italic = 0, anchor = 0.9 }, -- r +-- -- [0x1D460] = { xoffset = -0.05, width = 1.05, italic = 0 }, -- s +-- -- [0x1D461] = { xoffset = -0.15, width = 1.2, italic = 0, anchor = 0.9 }, -- t +-- -- [0x1D462] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 0.85 }, -- u +-- -- [0x1D463] = { xoffset = -0.1, width = 1.05, italic = 0, anchor = 0.85 }, -- v +-- -- [0x1D464] = { xoffset = -0.05, width = 1.05, italic = 0, anchor = 0.95 }, -- w +-- -- [0x1D465] = { width = 1.175, italic = 0, anchor = 0.9 }, -- x +-- -- [0x1D466] = { xoffset = -0.05, width = 1.05, italic = 0 }, -- y +-- -- [0x1D467] = { xoffset = -0.05, width = 1.1, italic = 0, anchor = 0.9 }, -- z +-- [0x1D6FC] = { xoffset = -0.075, width = 0.825, italic = 0 }, -- \alpha +-- [0x1D6FD] = { width = 0.9, italic = 0, anchor = 1.05 }, -- \beta +-- [0x1D6FE] = { xoffset = -0.075, width = 0.85, italic = 0.05, anchor = 1.05 }, -- \gamma +-- [0x1D6FF] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \delta +-- [0x1D716] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \epsilon +-- [0x1D700] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \varepsilon +-- [0x1D701] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \zeta +-- [0x1D702] = { xoffset = -0.1, width = 0.85, italic = 0, anchor = 1.05 }, -- \eta +-- [0x1D703] = { xoffset = -0.1, width = 0.85, italic = 0 }, -- \theta +-- [0x1D717] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \vartheta +-- [0x1D704] = { xoffset = -0.1, width = 0.9, italic = 0, anchor = 1.05 }, -- \iota +-- [0x1D705] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \kappa +-- [0x1D706] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.05 }, -- \lambda +-- [0x1D707] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \mu +-- [0x1D708] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \nu +-- [0x1D709] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \xi +-- [0x1D70A] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \omicron +-- [0x1D70B] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \pi +-- [0x1D71B] = { xoffset = -0.07, width = 0.85, italic = 0 }, -- \varpi +-- [0x1D70C] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \rho +-- [0x1D71A] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \varrho +-- [0x1D70D] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.02 }, -- \varsigma +-- [0x1D70E] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \sigma +-- [0x1D70F] = { xoffset = -0.08, width = 0.85, italic = 0, anchor = 1.05 }, -- \tau +-- [0x1D710] = { xoffset = -0.08, width = 0.85, italic = 0, anchor = 1.03 }, -- \upsilon +-- [0x1D719] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \phi +-- [0x1D711] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.02 }, -- \varphi +-- [0x1D712] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \chi +-- [0x1D713] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \psi +-- [0x1D714] = { xoffset = -0.05, width = 0.875, italic = 0 }, -- \omega +-- -- [0x1D718] = { xoffset = -0.075, width = 0.85, italic = 0, anchor = 1.03 }, -- \varkappa +-- [0x1D719] = { xoffset = -0.075, width = 0.85, italic = 0 }, -- \phi +-- [0x1D41B] = { width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright b +-- [0x1D41D] = { width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase upright d +-- [0x1D41F] = { width = 1.25, italic = 0, anchor = 0.8 }, -- bold lowercase upright f +-- [0x1D420] = { width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase upright g +-- [0x1D421] = { width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright h +-- [0x1D424] = { width = 1, italic = 0, anchor = 1.5 }, -- bold lowercase upright k +-- [0x1D425] = { width = 1, italic = 0, anchor = 0.75 }, -- bold lowercase upright l +-- [0x1D42A] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright q +-- [0x1D42B] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright r +-- [0x1D42C] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase upright s +-- -- [0x1D482] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic a +-- -- [0x1D483] = { width = 1, italic = 0, anchor = 1.1 }, -- bold lowercase italic b +-- -- [0x1D484] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic c +-- -- [0x1D485] = { width = 1, italic = 0, anchor = 0.75 }, -- bold lowercase italic d +-- -- [0x1D486] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic e +-- -- [0x1D487] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic f +-- -- [0x1D488] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic g +-- -- [0x1D489] = { width = 1, italic = 0, anchor = 1.2 }, -- bold lowercase italic h +-- -- [0x1D48A] = { width = 1, italic = 0, anchor = 0.6 }, -- bold lowercase italic i +-- -- [0x1D48B] = { width = 1, italic = 0, anchor = 0.8 }, -- bold lowercase italic j +-- -- [0x1D48C] = { width = 1, italic = 0, anchor = 1.2 }, -- bold lowercase italic k +-- -- [0x1D48D] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic l +-- -- [0x1D492] = { width = 1, italic = 0, anchor = 0.85 }, -- bold lowercase italic q +-- -- [0x1D493] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic r +-- -- [0x1D497] = { width = 1, italic = 0, anchor = 0.9 }, -- bold lowercase italic v +-- -- [0x1D499] = { width = 1.1, italic = 0, anchor = 0.9 }, -- bold lowercase italic x +-- -- [0x1D49A] = { width = 1, italic = 0, anchor = 0.95 }, -- bold lowercase italic y +-- -- [0x1D49B] = { width = 1, italic = 0, anchor = 1.1 }, -- bold lowercase italic z +-- [0x1D743] = { width = 1, italic = 0, anchor = 1.7 }, -- bold lowercase italic greek xi +-- -- [0x1D435] = { anchor = 1.05 }, -- italic B +-- -- [0x1D436] = { xoffset = -0.1, anchor = 0.7 }, -- italic C +-- -- [0x1D437] = { anchor = 1.25 }, -- italic D +-- -- [0x1D43A] = { anchor = 0.8 }, -- italic G +-- -- [0x1D442] = { anchor = 0.85 }, -- italic O +-- -- [0x1D443] = { anchor = 1.1 }, -- italic P +-- -- [0x1D444] = { anchor = 0.85 }, -- italic Q +-- -- [0x1D445] = { xoffset = -0.025, width = 1.05, anchor = 1.05 }, -- italic R +-- -- [0x1D446] = { xoffset = -0.05, anchor = 0.85 }, -- italic S +-- -- [0x1D447] = { xoffset = -0.05, width = 1.05, italic = 0.7, anchor = 0.9, }, -- italic T +-- -- [0x1D448] = { xoffset = -0.125, italic = 0.3, anchor = 0.9, }, -- italic U +-- -- [0x1D449] = { xoffset = -0.125, italic = 0.3, anchor = 0.9, }, -- italic V +-- -- [0x1D44A] = { xoffset = -0.075, italic = 0.3, anchor = 0.9, }, -- italic W +-- -- [0x1D44C] = { xoffset = -0.075, width = 1.1, italic = 0.35, anchor = 0.9, }, -- italic Y diff --git a/tex/context/fonts/mkiv/cambria-math.lfg b/tex/context/fonts/mkiv/cambria-math.lfg index 2207c0645..8f9cf73b9 100644 --- a/tex/context/fonts/mkiv/cambria-math.lfg +++ b/tex/context/fonts/mkiv/cambria-math.lfg @@ -46,11 +46,14 @@ end -- local integral_top = { topright = 0.05 } -- local integral_bottom = { bottomright = -0.30 } +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + return { name = "cambria-math", version = "1.00", comment = "Goodies that complement cambria.", - author = "Hans Hagen", + author = "Hans Hagen & Mikael Sundqvist", copyright = "ConTeXt development team", mathematics = { parameters = { @@ -72,38 +75,16 @@ return { tweaks = { aftercopying = { { - tweak = "dimensions", - list = { - - -- [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.05 }, -- dddot - -- [0x002C7] = { yoffset = -0.1 }, -- check - -- [0x020D7] = { yoffset = -0.05 }, -- 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.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 - - [0x1D43D] = { xoffset = 0.25, width = 1.15, italic = 0.2 }, -- J - [0x1D487] = { anchor = 0.8 }, -- bold lower case italic f - -- [0x1D487] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- bold lower case italic f - - }, + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 0.97 }, + presets.mathrsfscript { rscale = 0.97 }, + presets.mathxitsarabic { rscale = 0.95 }, + { + tweak = "simplifykerns", + }, + presets.moveitalics { + correct = true }, { tweak = "kerns", @@ -264,3 +245,40 @@ return { kernpairs = kernpairs, }, } + + +-- Old + -- { + -- tweak = "dimensions", + -- list = { + + -- -- [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.05 }, -- dddot + -- -- [0x002C7] = { yoffset = -0.1 }, -- check + -- -- [0x020D7] = { yoffset = -0.05 }, -- 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.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 + + -- [0x1D43D] = { xoffset = 0.25, width = 1.15, italic = 0.2 }, -- J + -- [0x1D487] = { anchor = 0.8 }, -- bold lower case italic f + -- -- [0x1D487] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- bold lower case italic f + + -- }, + -- }, diff --git a/tex/context/fonts/mkiv/common-math.lfg b/tex/context/fonts/mkiv/common-math.lfg new file mode 100644 index 000000000..d97511e76 --- /dev/null +++ b/tex/context/fonts/mkiv/common-math.lfg @@ -0,0 +1,106 @@ +return { + name = "common-math", + version = "1.00", + comment = "Goodies that complement pagella.", + author = "Hans Hagen & Mikael Sundqvist", + copyright = "ConTeXt development team", + mathematics = { + tweaks = { + presets = { + matheulercalligraphic = function(parameters) + return { + tweak = "replacealphabets", + feature = "matheulercalligraphic", + list = { + { + source = "uppercasescript", + target = "uppercasecalligraphic", + filename = "euler.otf", + rscale = parameters.rscale, + }, + { + source = "uppercaseboldscript", + target = "uppercaseboldcalligraphic", + filename = "euler.otf", + rscale = parameters.rscale, + }, + }, + } + end, + mathrsfscript = function(parameters) + return { + tweak = "replacealphabets", + feature = "mathrsfscript", + list = { + { + source = "uppercasescript", + target = "uppercasescript", + filename = "ralphsmithsformalscript-companion.otf", + rscale = parameters.rscale, + feature = "ss01", + }, + { + source = "uppercaseboldscript", + target = "uppercaseboldscript", + filename = "ralphsmithsformalscript-companion.otf", + rscale = parameters.rscale, + feature = "ss01", + }, + }, + } + end, + mathxitsarabic = function(parameters) + return { + tweak = "replacealphabets", + feature = "mathxitsarabic", + list = { + { + source = "arabicmathematicalalphabeticsymbols", + target = "arabicmathematicalalphabeticsymbols", + filename = "xitsmath-companion.otf", + rscale = parameters.rscale, + }, + { + source = "digitsarabicindic", + target = "digitsarabicindic", + filename = "xitsmath-companion.otf", + rscale = parameters.rscale, + }, + { + source = "digitsextendedarabicindic", + target = "digitsextendedarabicindic", + filename = "xitsmath-companion.otf", + rscale = parameters.rscale, + }, + }, + } + end, + moveitalics = function(parameters) + return { + tweak = "moveitalics", + correct = parameters.correct, + list = { + "lowercasenormal", + "lowercaseitalic", + "lowercasebold", + "lowercasebolditalic", + "lowercasegreeknormal", + "lowercasegreekitalic", + "lowercasegreekbold", + "lowercasegreekbolditalic", + "uppercasenormal", + "uppercaseitalic", + "uppercasebold", + "uppercasebolditalic", + "uppercasegreeknormal", + "uppercasegreekitalic", + "uppercasegreekbold", + "uppercasegreekbolditalic", + mathematics.tweaks.subsets.dotless, + } + } + end, + }, + }, + }, +} diff --git a/tex/context/fonts/mkiv/concrete-math.lfg b/tex/context/fonts/mkiv/concrete-math.lfg index ff55d353d..fd2d5caad 100644 --- a/tex/context/fonts/mkiv/concrete-math.lfg +++ b/tex/context/fonts/mkiv/concrete-math.lfg @@ -1,10 +1,13 @@ -- this file might go away and is for experiments only +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + return { name = "concrete-math", version = "1.00", comment = "Goodies that complement concrete math.", - author = "Hans Hagen", + author = "Hans Hagen & Mikael Sundqvist", copyright = "ConTeXt development team", mathematics = { parameters = { @@ -16,20 +19,21 @@ return { }, tweaks = { aftercopying = { - -- { - -- tweak = "fixprimes", - -- factor = 0.9, - -- }, { - tweak = "kerns", - list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, + tweak = "fixprimes", + factor = 0.9, }, + -- there are circular variants +-- { +-- tweak = "addmirrors", +-- }, +-- presets.matheulercalligraphic { rscale = 0.97 }, +-- presets.mathrsfscript { rscale = 0.95 }, + { + tweak = "kerns", + list = { + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + }, }, { tweak = "fixellipses", @@ -44,10 +48,12 @@ return { { tweak = "addequals", }, - - + { + tweak = "setoptions", + set = { "ignorekerndimensions" } }, }, + }, bigslots = { 1, 2, 3, 4 }, diff --git a/tex/context/fonts/mkiv/dejavu-math.lfg b/tex/context/fonts/mkiv/dejavu-math.lfg index c2e909aef..d18082b85 100644 --- a/tex/context/fonts/mkiv/dejavu-math.lfg +++ b/tex/context/fonts/mkiv/dejavu-math.lfg @@ -10,11 +10,11 @@ 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 } local integral_bottom = { bottomright = -0.25 } +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets return { name = "dejavu-math", @@ -27,17 +27,17 @@ return { NoLimitSupFactor = 0, NoLimitSubFactor = 900, FractionRuleThickness = 60, - AccentTopShiftUp = -25, - FlattenedAccentTopShiftUp = -25, - -- AccentExtendMargin = 50, + AccentTopShiftUp = -25, + FlattenedAccentTopShiftUp = -25, + -- AccentExtendMargin = 50, AccentBaseDepth = 30, RadicalDegreeBottomRaisePercent = 62, - RadicalRuleThickness = 46, -- 52 in font + RadicalRuleThickness = 46, -- 52 in font DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1333 in font - -- PrimeRaisePercent = 50, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + -- PrimeRaisePercent = 50, -- 50 default + PrimeRaiseComposedPercent = 10, -- 25 default }, tweaks = { aftercopying = { @@ -45,60 +45,37 @@ return { tweak = "version", expected = "Version 1.106", }, + { + tweak = "fixprimes", + scale = 0.85, + -- smaller = true, + factor = 1, + }, { - 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 }, - } + tweak = "addmirrors", }, + presets.matheulercalligraphic { rscale = 1.02 }, + presets.mathrsfscript { rscale = 1.02 }, + presets.mathxitsarabic { rscale = 1.05 }, + presets.moveitalics { correct = true }, { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.05, - bottomright = -0.05, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.15, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.15, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.1, - bottomright = -0.1, - }, -- 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 - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.1, bottomright = -0.1 }, -- 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.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom, @@ -125,9 +102,9 @@ return { { 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 + [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 }, }, @@ -136,20 +113,18 @@ return { { 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) + -- 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, @@ -157,12 +132,10 @@ return { { tweak = "copyaccents", }, - -- So far for the accents. - { tweak = "fixprimes", - -- scale = 0.9, - -- smaller = true, + -- scale = 0.9, + -- smaller = true, factor = 0.8, }, { @@ -191,7 +164,7 @@ return { tweak = "addequals", }, { - tweak = "addfourier", + tweak = "addfourier", variant = 1, }, }, @@ -209,3 +182,16 @@ return { kerns = kerns, }, } + + + +-- Old + -- { + -- tweak = "dimensions", + -- list = { + -- [0x1D44E] = { width = 1, italic = 0, anchor = 0.9 }, -- a + -- -- [0x1D449] = { width = .8, italic = .2 }, + -- -- [0x1D44A] = { width = .8, italic = .2 }, + -- ["0x1D449:0x1D44A"] = { width = .8, italic = .2 }, + -- } + -- }, diff --git a/tex/context/fonts/mkiv/erewhon-math.lfg b/tex/context/fonts/mkiv/erewhon-math.lfg index 71ff64648..fe8bb7108 100644 --- a/tex/context/fonts/mkiv/erewhon-math.lfg +++ b/tex/context/fonts/mkiv/erewhon-math.lfg @@ -1,10 +1,13 @@ -- This file might go away and is for experiments only. +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + return { name = "erewhon-math", version = "1.00", comment = "Goodies that complement erewhon math.", - author = "Hans Hagen", + author = "Hans Hagen & Mikael Sundqvist", copyright = "ConTeXt development team", mathematics = { parameters = { @@ -22,60 +25,36 @@ return { tweaks = { aftercopying = { { - tweak = "kerns", - list = { - [0x2F] = { - topleft = -0.15, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.15, - }, - - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.05, - bottomright = -0.05, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.1, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.1, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.1, - bottomright = -0.1, - }, -- 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 - - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - - }, - }, - { tweak = "fixprimes", factor = 0.9, scale = 0.9, }, { + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 0.93 }, + presets.mathrsfscript { rscale = 0.93 }, + presets.mathxitsarabic { rscale = 0.90 }, + { + tweak = "kerns", + list = { + [0x002F] = { topleft = -0.15, bottomright = -0.15 }, + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.1, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.1 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.1, bottomright = -0.1 }, -- 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.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + }, + }, + { tweak = "checkspacing", }, { @@ -93,6 +72,10 @@ return { { tweak = "addequals", }, + { + tweak = "setoptions", + set = { "ignorekerndimensions" } + }, }, }, bigslots = { diff --git a/tex/context/fonts/mkiv/garamond-math.lfg b/tex/context/fonts/mkiv/garamond-math.lfg index 7c1e7ab22..a0a0700f5 100644 --- a/tex/context/fonts/mkiv/garamond-math.lfg +++ b/tex/context/fonts/mkiv/garamond-math.lfg @@ -1,3 +1,6 @@ +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + return { name = "ebgaramond", version = "1.00", @@ -11,17 +14,17 @@ return { FractionRuleThickness = 60, OverbarRuleThickness = 60, UnderbarRuleThickness = 60, - AccentTopShiftUp = -75, - FlattenedAccentTopShiftUp = -75, - -- AccentExtendMargin = 50, + AccentTopShiftUp = -75, + FlattenedAccentTopShiftUp = -75, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 75, - -- RadicalRuleThickness = 50, -- 50 in font + -- RadicalRuleThickness = 50, -- 50 in font DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 85, -- 50 default - -- PrimeRaiseComposedPercent = 25, -- 25 default + PrimeRaisePercent = 85, -- 50 default + -- PrimeRaiseComposedPercent = 25, -- 25 default }, tweaks = { aftercopying = { @@ -30,122 +33,117 @@ return { expected = "Version 2019-08-16", }, { + tweak = "fixprimes", + scale = 0.95, + -- smaller = true, + factor = 0.95, + -- fake = 0.75, + }, + { + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 0.95 }, + presets.mathrsfscript { rscale = 0.95 }, + presets.mathxitsarabic { rscale = 0.80 }, + { + tweak = "oldstylemath", + factor = 0, + }, + { + tweak = "simplifykerns", + }, + presets.moveitalics { + correct = true + }, + { + tweak = "topanchors", + list = { + [0x1D453] = 0.88, -- italic f + }, + }, + { + tweak = "limits", + factor = 1.5, + list = mathematics.tweaks.subsets.integrals, + }, + { 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 - - -- [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 - - [0x00393] = { xoffset = 0.05, width = 1.05, italic = 0.075 }, -- \Gamma - -- [0x003A6] = { xoffset = 0.05, width = 1.05, italic = 0 }, -- \Phi difficult! - [0x003A8] = { xoffset = 0.05, width = 1.05, italic = 0.075 }, -- \Psi - [0x02113] = { xoffset = 0, width = 1, italic = 0.075 }, -- \ell - [0x1D436] = { xoffset = 0, width = 1, italic = 0.05 }, -- C - [0x1D43D] = { xoffset = 0.3, width = 1.4, italic = 0.1 }, -- J - [0x1D44B] = { xoffset = 0, width = 1, italic = 0.05 }, -- X - [0x1D44F] = { xoffset = 0, width = 1, italic = 0, 1.25 }, -- b - [0x1D450] = { xoffset = 0, width = 1.1, italic = 0 }, -- c - [0x1D451] = { xoffset = 0, width = 1, italic = 0.05, 0.8 }, -- d - [0x1D452] = { xoffset = 0, width = 1.1, italic = 0.05 }, -- e - [0x1D453] = { xoffset = 0.15, width = 1.15, italic = 0.1, 1.2 }, -- f - [0x1D454] = { xoffset = 0.1, width = 1.2, italic = 0.1 }, -- g - [0x0210E] = { xoffset = 0, width = 1.1, italic = 0, 1.4 }, -- h - [0x1D457] = { xoffset = 0.2, width = 1.25, italic = 0.05 }, -- j - [0x1D458] = { xoffset = 0, width = 1, italic = 0, 1.25 }, -- k - [0x1D459] = { xoffset = 0, width = 1, italic = 0.05 }, -- l - [0x1D45D] = { xoffset = 0.15, width = 1.15, italic = 0, 1.4 }, -- p - [0x1D45E] = { xoffset = 0, width = 1.05, italic = 0 }, -- q - [0x1D45F] = { xoffset = 0, width = 1.05, italic = 0 }, -- r - [0x1D461] = { xoffset = 0, width = 1, italic = 0.1 }, -- t - [0x1D465] = { xoffset = 0.05, width = 1.1, italic = 0.05 }, -- x - [0x1D466] = { xoffset = 0.2, width = 1.2, italic = 0, 1.35 }, -- y - [0x1D6FD] = { xoffset = 0.05, width = 1.1, italic = 0.05 }, -- \beta - [0x1D6FE] = { xoffset = 0, width = 1.05, italic = 0 }, -- \gamma - [0x1D6FF] = { xoffset = 0, width = 1, italic = 0.1 }, -- \delta - [0x1D716] = { xoffset = 0, width = 1.1, italic = 0 }, -- \epsilon - [0x1D700] = { xoffset = 0, width = 1.1, italic = 0 }, -- \varepsilon - [0x1D701] = { xoffset = 0, width = 1, italic = 0.15 }, -- \zeta - [0x1D703] = { xoffset = 0, width = 1, italic = 0.1 }, -- \theta - [0x1D705] = { xoffset = 0, width = 1, italic = 0.1 }, -- \kappa - [0x1D706] = { xoffset = 0.05, width = 1.1, italic = 0 }, -- \lambda - [0x1D707] = { xoffset = 0.05, width = 1.05, italic = 0 }, -- \mu - [0x1D708] = { xoffset = 0, width = 1.1, italic = 0 }, -- \nu - [0x1D709] = { xoffset = 0, width = 1.1, italic = 0 }, -- \xi - [0x1D70B] = { xoffset = 0, width = 1.05, italic = 0 }, -- \pi - [0x1D70C] = { xoffset = 0.2, width = 1.2, italic = 0 }, -- \rho - [0x1D70E] = { xoffset = 0, width = 1, italic = 0.1 }, -- \sigma - [0x1D70F] = { xoffset = 0.05, width = 1.05, italic = 0.1 }, -- \tau - [0x1D712] = { xoffset = 0.15, width = 1.2, italic = 0.05 }, -- \chi - [0x1D713] = { xoffset = 0.05, width = 1.05, italic = 0.05 }, -- \psi + -- for older entries, see bottom of file + [0x1D453] = { width = 1.1, }, -- italic f }, }, { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.05, - bottomright = -0.05, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.25, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.25, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.2, - bottomright = -0.2, - }, -- 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 - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.25, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.25 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- 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 -- angle + [0x27E9] = { topright = -0.1, bottomright = -0.1 }, + ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + }, + }, + { + -- to be considered + -- tweak = "kernpairs", + list = { + [mathematics.tweaks.subsets.gjqy] = { + [mathematics.tweaks.subsets.f] = -.1, + [0x1D70C] = -.1, -- italic \rho + }, + [mathematics.tweaks.subsets.bhklt] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + }, + [mathematics.tweaks.subsets.d] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + }, + [mathematics.tweaks.subsets.f] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + [mathematics.tweaks.subsets.gjqy] = -.25, + [mathematics.tweaks.subsets.bhklt] = -.1, + [mathematics.tweaks.subsets.d] = -.25, + [mathematics.tweaks.subsets.i] = -.25, + [mathematics.tweaks.subsets.mw] = -.25, + [mathematics.tweaks.subsets.p] = -.25, + [mathematics.tweaks.subsets.acenorsuvxz] = -.25, + [mathematics.tweaks.subsets.dotless] = -.25, + }, + [mathematics.tweaks.subsets.i] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + }, + [mathematics.tweaks.subsets.mw] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + }, + [mathematics.tweaks.subsets.p] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + }, + [mathematics.tweaks.subsets.acenorsuvxz] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + }, + [mathematics.tweaks.subsets.dotless] = { + [mathematics.tweaks.subsets.f] = -.25, + [0x1D70C] = -.25, -- italic \rho + }, + -- "uppercaseitalic" = { + -- [mathematics.tweaks.subsets.f] = -.25, + -- [0x1D70C] = -.25, -- italic \rho + -- }, }, }, -- Accents are a mess. We migrate the extensibles from the combiners to the base accent @@ -155,16 +153,16 @@ return { tweak = "extendaccents", }, { - tweak = "fixaccents", + tweak = "fixanchors", }, -- 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 + -- [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 }, }, @@ -195,13 +193,37 @@ return { tweak = "copyaccents", }, -- So far for the accents. - { - tweak = "fixprimes", - scale = 0.9, - -- smaller = true, - factor = 0.9, - -- fake = 0.75, + -- For non-italic alphabets we remove italic correction. + -- This one is/will become obsolete + -- 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", -- some remain + }, }, { tweak = "checkspacing", @@ -229,6 +251,9 @@ return { tweak = "addfourier", variant = 1, }, + { + tweak = "diagnose", + }, }, }, alternates = { @@ -248,3 +273,81 @@ return { } + + +-- Some old entries: + + -- { + -- 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 + + -- -- [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 + + -- [0x00393] = { xoffset = 0.05, width = 1.05, italic = 0.075 }, -- \Gamma + -- -- [0x003A6] = { xoffset = 0.05, width = 1.05, italic = 0 }, -- \Phi difficult! + -- [0x003A8] = { xoffset = 0.05, width = 1.05, italic = 0.075 }, -- \Psi + -- [0x02113] = { width = 1, italic = 0.075 }, -- \ell + -- [0x1D436] = { width = 1, italic = 0.05 }, -- C + -- [0x1D43D] = { xoffset = 0.3, width = 1.4, italic = 0.1 }, -- J + -- [0x1D44B] = { width = 1, italic = 0.05 }, -- X + -- [0x1D44F] = { width = 1, italic = 0, }, -- b + -- [0x1D450] = { width = 1.1, italic = 0 }, -- c + -- [0x1D451] = { width = 1, italic = 0.05, }, -- d + -- [0x1D452] = { width = 1.1, italic = 0.05 }, -- e + -- [0x00066] = { width = 1.4, italic = 0.0, }, -- f + -- [0x1D453] = { xoffset = 0.15, width = 1.15, italic = 0.1, }, -- f + -- [0x1D454] = { xoffset = 0.1, width = 1.2, italic = 0.1 }, -- g + -- [0x0210E] = { width = 1.1, italic = 0, }, -- h + -- [0x1D457] = { xoffset = 0.2, width = 1.25, italic = 0.05 }, -- j + -- [0x1D458] = { width = 1, italic = 0, }, -- k + -- [0x1D459] = { width = 1, italic = 0.05 }, -- l + -- [0x1D45D] = { xoffset = 0.15, width = 1.15, italic = 0, }, -- p + -- [0x1D45E] = { width = 1.05, italic = 0 }, -- q + -- [0x1D45F] = { width = 1.05, italic = 0 }, -- r + -- [0x1D461] = { width = 1, italic = 0.1 }, -- t + -- [0x1D465] = { xoffset = 0.05, width = 1.1, italic = 0.05 }, -- x + -- [0x1D466] = { xoffset = 0.2, width = 1.2, italic = 0, }, -- y + -- [0x1D6FD] = { xoffset = 0.05, width = 1.1, italic = 0.05 }, -- \beta + -- [0x1D6FE] = { width = 1.05, italic = 0 }, -- \gamma + -- [0x1D6FF] = { width = 1, italic = 0.1 }, -- \delta + -- [0x1D716] = { width = 1.1, italic = 0 }, -- \epsilon + -- [0x1D700] = { width = 1.1, italic = 0 }, -- \varepsilon + -- [0x1D701] = { width = 1, italic = 0.15 }, -- \zeta + -- [0x1D703] = { width = 1, italic = 0.1 }, -- \theta + -- [0x1D705] = { width = 1, italic = 0.1 }, -- \kappa + -- [0x1D706] = { xoffset = 0.05, width = 1.1, italic = 0 }, -- \lambda + -- [0x1D707] = { xoffset = 0.05, width = 1.05, italic = 0 }, -- \mu + -- [0x1D708] = { width = 1.1, italic = 0 }, -- \nu + -- [0x1D709] = { width = 1.1, italic = 0 }, -- \xi + -- [0x1D70B] = { width = 1.05, italic = 0 }, -- \pi + -- [0x1D70C] = { xoffset = 0.2, width = 1.2, italic = 0 }, -- \rho + -- [0x1D70E] = { width = 1, italic = 0.1 }, -- \sigma + -- [0x1D70F] = { xoffset = 0.05, width = 1.05, italic = 0.1 }, -- \tau + -- [0x1D712] = { xoffset = 0.15, width = 1.2, italic = 0.05 }, -- \chi + -- [0x1D713] = { xoffset = 0.05, width = 1.05, italic = 0.05 }, -- \psi + -- }, + -- }, diff --git a/tex/context/fonts/mkiv/generic-math.lfg b/tex/context/fonts/mkiv/generic-math.lfg index 490ad1416..214e479e0 100644 --- a/tex/context/fonts/mkiv/generic-math.lfg +++ b/tex/context/fonts/mkiv/generic-math.lfg @@ -102,6 +102,17 @@ return { -- [0x21CC] = false, } }, +-- { +-- tweak = "limits", +-- factor = 1.5, +-- list = { +-- [0x0222B] = true, +-- [0x0222C] = 1.45, +-- [0x0222D] = true, +-- [0x0222E] = true, +-- [0x0222F] = true, +-- }, +-- }, { -- For upright alphabets, we unset the anchor. -- This means that accents are placed @@ -171,6 +182,18 @@ return { "uppercasesanserifnormal", }, }, + -- { + -- comment = "example" + -- tweak = "action", + -- action = function(target,original,parameters) mathematics.tweaks.fixdimensions(target, original, parameters) + -- list = fixes, -- one of the parameters + -- }, + -- { + -- comment = "example" + -- tweak = "action", + -- action = mathematics.tweaks.fixdimensions, + -- list = fixes, -- one of the parameters + -- }, { -- This one fakes margins to get larger/smaller accents -- with for example \widetilde. @@ -179,6 +202,10 @@ return { list = { }, }, + -- { + -- tweak = "fixanchors", + -- factor = .5, + -- }, { tweak = "addrules", }, diff --git a/tex/context/fonts/mkiv/kpfonts-math.lfg b/tex/context/fonts/mkiv/kpfonts-math.lfg index c0b019f79..ed50baf3b 100644 --- a/tex/context/fonts/mkiv/kpfonts-math.lfg +++ b/tex/context/fonts/mkiv/kpfonts-math.lfg @@ -1,3 +1,6 @@ +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + return { name = "kpfonts-math", version = "1.00", @@ -11,12 +14,12 @@ return { -- AccentBaseHeight = 0, AccentBaseDepth = 30, RadicalDegreeBottomRaisePercent = 70, - -- RadicalRuleThickness = 50, -- 50 in font + -- RadicalRuleThickness = 50, -- 50 in font DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1500 in font (only one) - PrimeRaisePercent = 25, -- 50 default - -- PrimeRaiseComposedPercent = 25, -- 25 default + PrimeRaisePercent = 25, -- 50 default + -- PrimeRaiseComposedPercent = 25, -- 25 default }, tweaks = { aftercopying = { @@ -27,51 +30,22 @@ return { { tweak = "dimensions", list = { - [0x2A3F] = { - factor = 0.84625, - } + [0x2A3F] = { factor = 0.84625 } }, }, { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - - ["0x7D.parts.top"] = { - topright = -0.25, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.25, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.1, - bottomright = -0.1, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.05, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.05, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.05, - bottomright = -0.05, - }, -- 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 + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x7D.parts.top"] = { topright = -0.25 }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.25 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.1, bottomright = -0.1 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.05 }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.05 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.05, bottomright = -0.05 }, -- 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 }, }, @@ -84,6 +58,34 @@ return { -- -- keep = true, -- keep the text size prime (aka minute) -- }, { + tweak = "addmirrors", + }, + { + -- kpfonts have calligraphic at private slots + tweak = "replacealphabets", + list = { + { + source = "uppercasescript", + target = "uppercasecalligraphic", + }, + { + source = { first = 0x0E7E1, last = 0x0E7FA }, + target = "uppercasecalligraphic", + }, + { + source = "uppercaseboldscript", + target = "uppercaseboldcalligraphic", + }, + { + source = { first = 0x0E701, last = 0x0E71A }, + target = "uppercaseboldcalligraphic", + }, + }, + }, + presets.matheulercalligraphic { rscale = 0.95 }, + presets.mathrsfscript { rscale = 0.95 }, + presets.mathxitsarabic { rscale = 0.92 }, + { tweak = "checkspacing", }, { @@ -96,8 +98,9 @@ return { tweak = "addrules", }, { + -- This will be fixed. Check if new version comes out! tweak = "addbars", - advance = 0.025, + advance = 0.5, }, { tweak = "addactuarian", @@ -105,6 +108,10 @@ return { { tweak = "addequals", }, + { + tweak = "setoptions", + set = { "ignorekerndimensions" } + }, }, }, alternates = { diff --git a/tex/context/fonts/mkiv/libertinus-math.lfg b/tex/context/fonts/mkiv/libertinus-math.lfg index 77d0161e3..ea6a27cad 100644 --- a/tex/context/fonts/mkiv/libertinus-math.lfg +++ b/tex/context/fonts/mkiv/libertinus-math.lfg @@ -4,6 +4,11 @@ -- 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 + return { name = "libertinus-math", version = "1.00", @@ -20,17 +25,17 @@ return { UnderbarRuleThickness = 50, AccentTopShiftUp = -35, FlattenedAccentTopShiftUp = -35, - -- AccentExtendMargin = 50, + -- AccentExtendMargin = 50, -- AccentTopShiftUp = 0, AccentBaseDepth = 10, RadicalDegreeBottomRaisePercent = 60, RadicalKernAfterDegree = -425, - -- RadicalRuleThickness = 40, -- 40 in font + -- RadicalRuleThickness = 40, -- 40 in font DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1250 in font (only one) - PrimeRaisePercent = 70, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + PrimeRaisePercent = 70, -- 50 default + PrimeRaiseComposedPercent = 10, -- 25 default }, tweaks = { aftercopying = { @@ -40,85 +45,56 @@ return { expected = "Version 7.040", }, { - 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 - - -- [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) - -- [0x0210E] = { width = 1, italic = 0, anchor = 1.5 }, -- h (6.8) - -- [0x1D458] = { width = 1, italic = 0, anchor = 1.5 }, -- k (6.8) - }, + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 0.92 }, + presets.mathrsfscript { rscale = 0.92 }, + presets.mathxitsarabic { rscale = 0.85 }, + { + tweak = "simplifykerns", + }, + { + -- When it makes sense we get rid of italics. + tweak = "moveitalics", + correct = true, + list = { + "lowercasenormal", + "lowercaseitalic", + "lowercasebold", + "lowercasebolditalic", + "lowercasegreeknormal", + "lowercasegreekitalic", + "lowercasegreekbold", + "lowercasegreekbolditalic", + "uppercasenormal", + "uppercaseitalic", + "uppercasebold", + "uppercasebolditalic", + "uppercasegreeknormal", + "uppercasegreekitalic", + "uppercasegreekbold", + "uppercasegreekbolditalic", + mathematics.tweaks.subsets.dotless, + } }, + { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.15, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.15, - }, - - ["0x7D.parts.top"] = { - topright = -0.2, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.2, - }, -- right brace bottom - -- ["0x7D.variants.*"] = { - -- topright = -0.05, - -- bottomright = -0.05, - -- }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.15, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.15, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.15, - bottomright = -0.15, - }, -- 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 - - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x002F] = { topleft = -0.15, bottomright = -0.15 }, + ["0x7D.parts.top"] = { topright = -0.2, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.2 }, -- right brace bottom + -- ["0x7D.variants.*"] = { topright = -0.05, bottomright = -0.05 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.15, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.15 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- 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.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, }, }, @@ -148,19 +124,17 @@ return { 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) + -- [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, @@ -169,8 +143,6 @@ return { tweak = "copyaccents", }, -- So far for the accents. - - { tweak = "fixprimes", scale = 0.9, @@ -203,6 +175,10 @@ return { tweak = "addfourier", variant = 1, }, + { + tweak = "setoptions", + set = { "ignorekerndimensions" } + }, }, }, bigslots = { @@ -210,3 +186,40 @@ return { }, }, } + +-- Old values + -- { + -- 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 + + -- -- [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) + -- -- [0x0210E] = { width = 1, italic = 0, anchor = 1.5 }, -- h (6.8) + -- -- [0x1D458] = { width = 1, italic = 0, anchor = 1.5 }, -- k (6.8) + -- }, + -- }, + diff --git a/tex/context/fonts/mkiv/lm.lfg b/tex/context/fonts/mkiv/lm.lfg index 1d81e0b77..355b583d1 100644 --- a/tex/context/fonts/mkiv/lm.lfg +++ b/tex/context/fonts/mkiv/lm.lfg @@ -1,6 +1,9 @@ -- In order to be able to use beta math fonts, we use our own file name and -- always remap. +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + local dimensions, kerns if CONTEXTLMTXMODE == 0 then local kern_150 = { bottomright = { { kern = -150 } } } @@ -76,8 +79,14 @@ return { DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 60, -- 50 default - PrimeRaiseComposedPercent = 15, -- 25 default + 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 }, tweaks = { aftercopying = { @@ -86,6 +95,13 @@ return { expected = "Version 1.958", }, { + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 1 }, + presets.mathrsfscript { rscale = 1 }, + presets.mathxitsarabic { rscale = 0.88 }, + presets.moveitalics { correct = true }, + { tweak = "dimensions", list = { -- [0x00060] = { yoffset = -0.05 }, -- grave @@ -447,7 +463,7 @@ return { -- "lowercasedoublestruck", -- "lowercasefraktur", "lowercasemonospace", - "lowercasenormal", + -- "lowercasenormal", -- "lowercasesansserifbold", -- "lowercasesansserifnormal", -- "lowercasegreeknormal", @@ -551,6 +567,9 @@ return { tweak = "fixradicals", }, { + tweak = "addprivates", + }, + { tweak = "addscripts", }, { diff --git a/tex/context/fonts/mkiv/lucida-opentype-math.lfg b/tex/context/fonts/mkiv/lucida-opentype-math.lfg index 372d8cce2..97cf97ab1 100644 --- a/tex/context/fonts/mkiv/lucida-opentype-math.lfg +++ b/tex/context/fonts/mkiv/lucida-opentype-math.lfg @@ -1,3 +1,5 @@ +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets local dimensions, kerns if CONTEXTLMTXMODE == 0 then -- local kern_250 = { bottomright = { { kern = -250 } }, force = true } @@ -42,75 +44,83 @@ return { NoLimitSupFactor = 0, NoLimitSubFactor = 900, FractionRuleThickness = 55, - -- AccentTopShiftUp = 0, - -- FlattenedAccentTopShiftUp = 0, - -- AccentExtendMargin = 50, + -- AccentTopShiftUp = 0, + -- FlattenedAccentTopShiftUp = 0, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 650, AccentBaseDepth = 150, RadicalDegreeBottomRaisePercent = 50, RadicalKernAfterDegree = -600, - -- RadicalRuleThickness = 35, -- 40 in font (46 in demi) + -- RadicalRuleThickness = 35, -- 40 in font (46 in demi) DelimiterPercent = 90, DelimiterShortfall = 400, -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 60, -- 50 default - PrimeRaiseComposedPercent = 50, -- 25 default + PrimeRaisePercent = 60, -- 50 default + PrimeRaiseComposedPercent = 50, -- 25 default +-- AxisHeight = 325, }, tweaks = { aftercopying = { { tweak = "version", - expected = "Version 1.802", + expected = "Version 1.803", }, - -- { - -- tweak = "substitutes", - -- list = { - -- [0x2264] = "ss03", - -- [0x2265] = "ss03", - -- } - -- }, - -- \definefontfeature[mathlucida][copymathscripts=yes] - -- \definefontfeature[mathlucida][copymathscripts=yes,ss04=yes] - -- 0xFEOO should be chancery style, if present { - tweak = "variants", - kind = "script", - feature = "ss04",-- this changes to chancery style for lucida - -- feature = false, -- use the saved ones (see typescript) - selector = 0xFE00, + tweak = "fixoldschool", + version = "Version 1.802", }, - -- 0xFEO1 should be roundhand style, if present +-- { +-- tweak = "showinfo", +-- version = "Version 1.803", +-- }, { - tweak = "variants", - kind = "script", - selector = 0xFE01, + tweak = "addmirrors", + }, + presets.mathxitsarabic { + rscale = 1.05 + }, + { + tweak = "replacealphabets", + list = { + { + source = "uppercasescript", + target = "uppercasecalligraphic", + feature = "ss04", + }, + }, + }, + { + tweak = "dimensions", + version = "Version 1.802", + list = { + -- The < and > are slightly too small. We scale them by 867/795 + ["0x003C"] = { scale = 1.09057, width = 1.09057, height = 1.09057 }, + ["0x003E"] = { scale = 1.09057, width = 1.09057, height = 1.09057 }, + -- The = is too big if in ss03. We scale it by 795/867 (not working like this) + -- ["0x003D.ss03"] = { scale = 0.916955, width = 0.916955, height = 0.916955 }, + }, }, { tweak = "dimensions", list = { - -- these we fix here + -- these we fix here. Remove when we have new version of Lucida ["0x23DC.parts.1"] = { xoffset = -0.075, height = .4, yoffset = -0.6 }, ["0x23DC.parts.2"] = { height = .4, yoffset = -0.6 }, ["0x23DC.parts.3"] = { xoffset = 0.075, height = .4, yoffset = -0.6 }, ["0x23DD.parts.1"] = { xoffset = -0.075, depth = .8, yoffset = 0.2 }, ["0x23DD.parts.2"] = { depth = .8, yoffset = 0.2 }, ["0x23DD.parts.3"] = { xoffset = 0.075, depth = .8, yoffset = 0.2 }, - -- The < and > are slightly too small. We scale them by 867/795 - ["0x003C"] = { scale = 1.09057, width = 1.09057, height = 1.09057 }, - ["0x003E"] = { scale = 1.09057, width = 1.09057, height = 1.09057 }, - -- The = is too big if in ss03. We scale it by 795/867 (not working like this) - -- ["0x003D.ss03"] = { scale = 0.916955, width = 0.916955, height = 0.916955 }, -- these are done later using the AccentBase* parameters -- [0x23DC] = { height = .2, yoffset = -0.8 }, -- [0x23DD] = { depth = .6, yoffset = 0.4 }, - + -- -- ["0x7C.variants.1"] = { squeeze = 0.75, height = 0.75, depth = 0.75 }, -- ["0x7C.variants.2"] = { squeeze = 0.75, height = 0.75, depth = 0.75 }, -- ["0x7C.variants.3"] = { squeeze = 0.75, height = 0.75, depth = 0.75 }, -- ["0x7C.variants.4"] = { squeeze = 0.75, height = 0.75, depth = 0.75 }, -- going zero makes them be ignored - ["0x7C.variants.3"]={ squeeze = 0.90, height = 0.90, depth = 0.90 }, - ["0x7C.variants.4"]={ squeeze = 0.80, height = 0.80, depth = 0.80 }, + ["0x7C.variants.3"] = { squeeze = 0.90, height = 0.90, depth = 0.90 }, + ["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 @@ -127,10 +137,10 @@ return { { 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 + -- [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 @@ -138,20 +148,18 @@ return { { 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) + -- 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, @@ -173,50 +181,20 @@ return { { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.15, - bottomright = -0.15, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.25, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.25, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.2, - bottomright = -0.2, - }, -- 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 - - -- angle - [0x27E9] = { topright = -0.2, bottomright = -0.2 }, - ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, - [0x27EB] = { topright = -0.2, bottomright = -0.2 }, - ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 }, - + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x7D.parts.top"] = { topright = -0.15 }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.25 }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.25 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- 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 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + [0x27EB] = { topright = -0.2, bottomright = -0.2 }, + ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 }, ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom, @@ -254,7 +232,7 @@ return { }, { tweak = "addfourier", - -- scale = 1.5, + -- scale = 1.5, variant = 1, }, { @@ -269,9 +247,9 @@ return { [0x2192] = false, [0x219E] = false, [0x21A0] = false, --- [0x21A6] = false, --- [0x21CB] = false, --- [0x21CC] = false, + -- [0x21A6] = false, + -- [0x21CB] = false, + -- [0x21CC] = false, } }, }, diff --git a/tex/context/fonts/mkiv/minion-math.lfg b/tex/context/fonts/mkiv/minion-math.lfg index 162b9f628..5216e1289 100644 --- a/tex/context/fonts/mkiv/minion-math.lfg +++ b/tex/context/fonts/mkiv/minion-math.lfg @@ -14,6 +14,9 @@ local dimensions, kerns if CONTEXTLMTXMODE == 0 then end +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + return { name = "minion-math", version = "1.00", @@ -37,49 +40,51 @@ return { parameters = { NoLimitSupFactor = 0, NoLimitSubFactor = 900, - -- AccentTopShiftUp = -15, - -- FlattenedAccentTopShiftUp = -15, - -- -- AccentExtendMargin = 50, - -- AccentBaseDepth = 50, - -- RadicalDegreeBottomRaisePercent = 60, - -- RadicalRuleThickness = 66, -- 72 in font - -- DelimiterPercent = 90, - -- DelimiterShortfall = 400, - -- DisplayOperatorMinHeight = 1900, -- 1250 in font - -- -- AccentSuperscriptDrop = 100, - -- -- AccentSuperscriptPercent = 20, - PrimeRaisePercent = 50, -- 50 default - PrimeRaiseComposedPercent = 25, -- 25 default - -- PrimeShiftUp = 0, - -- PrimeBaselineDropMax = 0, - RadicalKernAfterExtensible = 100, -- 0 default - RadicalKernBeforeExtensible = 100, -- 0 default + -- AccentTopShiftUp = -15, + -- FlattenedAccentTopShiftUp = -15, + -- AccentExtendMargin = 50, + -- AccentBaseDepth = 50, + -- RadicalDegreeBottomRaisePercent = 60, + -- RadicalRuleThickness = 66, -- 72 in font + -- DelimiterPercent = 90, + -- DelimiterShortfall = 400, + -- DisplayOperatorMinHeight = 1900, -- 1250 in font + -- AccentSuperscriptDrop = 100, + -- AccentSuperscriptPercent = 20, + PrimeRaisePercent = 50, -- 50 default + PrimeRaiseComposedPercent = 25, -- 25 default + -- PrimeShiftUp = 0, + -- PrimeBaselineDropMax = 0, + RadicalKernAfterExtensible = 100, -- 0 default + RadicalKernBeforeExtensible = 100, -- 0 default }, tweaks = { aftercopying = { -- { -- tweak = "version", - -- expected = "unknown", + -- expected = "unknown", -- todo -- }, { - tweak = "dimensions", - -- smaller = true, - list = dimensions, + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 0.95 }, + presets.mathrsfscript { rscale = 0.95 }, + presets.mathxitsarabic { rscale = 0.88 }, + { + tweak = "simplifykerns", + }, + presets.moveitalics { + correct = true + }, + { -- Check! + tweak = "replacealphabets", + list = { + { + source = "uppercasecalligraphic", + target = "uppercasescript", + }, + }, }, - -- { - -- tweak = "variants", - -- kind = "script", - -- feature = "s_s_0",-- this changes to chancery style for lucida - -- -- feature = false, -- use the saved ones (see typescript) - -- selector = 0xFE00, - -- }, - -- -- 0xFEO1 should be roundhand style, if present - -- { - -- tweak = "variants", - -- kind = "script", - -- selector = 0xFE01, - -- }, - { tweak = "extendaccents", }, @@ -94,18 +99,18 @@ return { factor = 0.95, scale = 0.9, }, - -- { - -- tweak = "checkspacing", - -- }, - -- { - -- tweak = "addscripts", - -- }, - -- { - -- tweak = "accentdimensions", - -- }, - -- { - -- tweak = "addrules", - -- }, + -- { + -- tweak = "checkspacing", + -- }, + -- { + -- tweak = "addscripts", + -- }, + -- { + -- tweak = "accentdimensions", + -- }, + -- { + -- tweak = "addrules", + -- }, { tweak = "addfourier", variant = 1, diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg index 021bd2b7f..59eafeaaf 100644 --- a/tex/context/fonts/mkiv/pagella-math.lfg +++ b/tex/context/fonts/mkiv/pagella-math.lfg @@ -29,11 +29,13 @@ end -- When set this will bypass the italic correction hackery! +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets + local integral_variants = { bottomright = -0.20 } ----- integral_top = { topright = 0.05 } local integral_bottom = { bottomright = -0.20 } - return { name = "pagella-math", version = "1.00", @@ -45,20 +47,22 @@ return { NoLimitSupFactor = 0, NoLimitSubFactor = 900, AccentTopShiftUp = 10, - FlattenedAccentTopShiftUp = 10, -- now also set, the wide ones (so we can move in one go) - -- AccentExtendMargin = 50, + FlattenedAccentTopShiftUp = 10, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 80, -- SpaceAfterScript = 0, -- SpaceAfterScript = 30, RadicalDegreeBottomRaisePercent = 60, RadicalKernAfterDegree = -500, - RadicalRuleThickness = 54, -- 60 in font + RadicalRuleThickness = 54, -- 60 in font DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1500 in font - PrimeRaisePercent = 75, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + PrimeRaisePercent = 75, -- 50 default + PrimeRaiseComposedPercent = 10, -- 25 default + -- RadicalKernAfterExtensible = 0, -- 0 default + -- RadicalKernBeforeExtensible = 0, -- 0 default }, tweaks = { aftercopying = { @@ -66,47 +70,58 @@ return { tweak = "version", expected = "Version 1.632", }, - -- { - -- comment = "example" - -- tweak = "action", - -- action = function(target,original,parameters) mathematics.tweaks.fixdimensions(target, original, parameters) - -- list = fixes, -- one of the parameters - -- }, - -- { - -- comment = "example" - -- tweak = "action", - -- action = mathematics.tweaks.fixdimensions, - -- list = fixes, -- one of the parameters - -- }, { - tweak = "dimensions", - list = { -- offset width italic - [0x020D7] = { yoffset = -0.05 }, -- vec - [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 - [0x1D451] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- d - [0x1D452] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- e - [0x1D453] = { xoffset = 0.50, width = 1.70, italic = 0.6, anchor = 1.2 }, -- f - [0x1D454] = { xoffset = 0.10, width = 1.15, italic = 0.2 }, -- g - [0x0210E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- h - [0x1D458] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- k - [0x1D459] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- l - [0x1D45E] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- q - [0x1D463] = { xoffset = 0, width = 1, italic = 0, anchor = 1.25 }, -- v - [0x1D464] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- w - [0x1D6FE] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \gamma - [0x1D706] = { xoffset = 0, width = 1, italic = 0, anchor = 1.05 }, -- \lambda - [0x1D70A] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \omicron - [0x1D70D] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \varsigma - [0x1D70E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.1 }, -- \sigma - [0x1D70F] = { xoffset = -.10, width = 1, italic = 0, anchor = 0.95 }, -- \tau - [0x1D712] = { xoffset = 0.1, width = 1.2, italic = 0.1 }, -- \chi - [0x1D713] = { xoffset = -0.05, width = 0.95, italic = 0.1 }, -- \psi - [0x1D71D] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- \varpi + tweak = "fixprimes", + factor = 0.9, + -- smaller = true, + scale = 0.9, + -- fake = 0.65, + }, + { + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 0.97 }, + presets.mathrsfscript { rscale = 0.97 }, + presets.mathxitsarabic { rscale = 0.95 }, + { + -- When it makes sense we get rid of italics. + tweak = "moveitalics", + correct = true, + list = { + "lowercasenormal", + "lowercaseitalic", + "lowercasebold", + "lowercasebolditalic", + "lowercasegreeknormal", + "lowercasegreekitalic", + "lowercasegreekbold", + "lowercasegreekbolditalic", + "uppercasenormal", + "uppercaseitalic", + "uppercasebold", + "uppercasebolditalic", + "uppercasegreeknormal", + "uppercasegreekitalic", + "uppercasegreekbold", + "uppercasegreekbolditalic", + mathematics.tweaks.subsets.dotless, + } + }, + { + tweak = "setovershoots", + list = { + { + target = "uppercasescript", + -- quad = true, -- to be decided + topovershoot = 0.05, + }, + { + target = "uppercaseboldscript", + -- quad = true, -- to be decided + topovershoot = 0.05, + }, }, }, - -- 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. @@ -126,7 +141,7 @@ return { [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 + [0x0030A] = { width = 0.9, xoffset = -.0 }, -- widering -- weird this one [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck }, }, @@ -135,20 +150,18 @@ return { { 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) + -- 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, @@ -165,50 +178,24 @@ return { { tweak = "kerns", list = { - -- ["*:0x2F"] = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.15, - bottomright = -0.15, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.25, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.25, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.2, - bottomright = -0.2, - }, -- 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 - + -- ["*:0x2F"] = { ... } + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + -- + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.25, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.25 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- 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 -- angle - [0x27E9] = { topright = -0.2, bottomright = -0.2 }, - ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, - [0x27EB] = { topright = -0.2, bottomright = -0.2 }, - ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 }, - + [0x27E9] = { topright = -0.2, bottomright = -0.2 }, + ["0x27E9.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + [0x27EB] = { topright = -0.2, bottomright = -0.2 }, + ["0x27EB.variants.*"] = { topright = -0.3, bottomright = -0.3 }, + -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom, @@ -218,18 +205,9 @@ 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, - - }, }, { - tweak = "fixprimes", - factor = 0.9, - -- smaller = true, - scale = 0.9, - -- fake = 0.65, - }, - { tweak = "checkspacing", }, { @@ -258,21 +236,19 @@ return { tweak = "addequals", }, { - tweak = "addfourier", + tweak = "addfourier", variant = 1, }, - -{ - tweak = "kernpairs", - list = { - -- beware: we kept the italic correction in spite of punctuation class - [0x1D453] = { -- f - [0x3A] = -.1, - [0x3B] = -.1, - }, - }, -}, - + { + tweak = "kernpairs", + list = { + -- beware: we kept the italic correction in spite of punctuation class + [0x1D453] = { -- f + [0x3A] = -.1, + [0x3B] = -.1, + }, + }, + }, }, }, bigslots = { @@ -288,3 +264,38 @@ return { kerns = kerns, }, } + + + + + +-- Old values + + -- { + -- tweak = "dimensions", + -- list = { -- offset width italic + -- [0x020D7] = { yoffset = -0.05 }, -- vec + -- [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 + -- [0x1D451] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- d + -- [0x1D452] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- e + -- [0x1D453] = { xoffset = 0.50, width = 1.70, italic = 0.6, anchor = 1.2 }, -- f + -- [0x1D454] = { xoffset = 0.10, width = 1.15, italic = 0.2 }, -- g + -- [0x0210E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- h + -- [0x1D458] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- k + -- [0x1D459] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- l + -- [0x1D45E] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- q + -- [0x1D463] = { xoffset = 0, width = 1, italic = 0, anchor = 1.25 }, -- v + -- [0x1D464] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- w + -- [0x1D6FE] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \gamma + -- [0x1D706] = { xoffset = 0, width = 1, italic = 0, anchor = 1.05 }, -- \lambda + -- [0x1D70A] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \omicron + -- [0x1D70D] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \varsigma + -- [0x1D70E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.1 }, -- \sigma + -- [0x1D70F] = { xoffset = -.10, width = 1, italic = 0, anchor = 0.95 }, -- \tau + -- [0x1D712] = { xoffset = 0.1, width = 1.2, italic = 0.1 }, -- \chi + -- [0x1D713] = { xoffset = -0.05, width = 0.95, italic = 0.1 }, -- \psi + -- [0x1D71D] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- \varpi + -- }, + -- }, diff --git a/tex/context/fonts/mkiv/schola-math.lfg b/tex/context/fonts/mkiv/schola-math.lfg index cb992cd0b..54d24ffa3 100644 --- a/tex/context/fonts/mkiv/schola-math.lfg +++ b/tex/context/fonts/mkiv/schola-math.lfg @@ -10,11 +10,11 @@ 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 } local integral_bottom = { bottomright = -0.20 } +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets return { name = "schola-math", @@ -28,17 +28,17 @@ return { NoLimitSubFactor = 900, AccentTopShiftUp = -15, FlattenedAccentTopShiftUp = -15, - -- AccentExtendMargin = 50, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 30, RadicalDegreeBottomRaisePercent = 60, RadicalKernAfterDegree = -500, - RadicalRuleThickness = 64, -- 70 in font + RadicalRuleThickness = 64, -- 70 in font DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1333 in font - -- PrimeRaisePercent = 50, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + -- PrimeRaisePercent = 50, -- 50 default + PrimeRaiseComposedPercent = 10, -- 25 default }, tweaks = { aftercopying = { @@ -47,58 +47,36 @@ return { expected = "Version 1.533", }, { - tweak = "dimensions", - list = { - -- nothing yet - } + tweak = "fixprimes", + scale = 0.85, + -- smaller = true, + factor = 1, }, { + tweak = "addmirrors", + }, + presets.matheulercalligraphic { rscale = 1 }, + presets.mathrsfscript { rscale = 1 }, + presets.mathxitsarabic { rscale = 0.93 }, + presets.moveitalics { correct = true }, + { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.15, - bottomright = -0.15, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.25, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.25, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.2, - bottomright = -0.2, - }, -- 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 - - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - - + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.25, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.25 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- 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.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom, @@ -126,9 +104,9 @@ return { { 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 + [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 }, }, @@ -137,20 +115,18 @@ return { { 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) + -- 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, @@ -158,16 +134,6 @@ return { { tweak = "copyaccents", }, - -- So far for the accents. - - - - { - tweak = "fixprimes", - scale = 0.85, - -- smaller = true, - factor = 1, - }, { tweak = "checkspacing", }, @@ -191,8 +157,8 @@ return { tweak = "addequals", }, { - tweak = "addfourier", - -- scale = 1.25, + tweak = "addfourier", + -- scale = 1.25, variant = 1, }, }, diff --git a/tex/context/fonts/mkiv/stix-two-math.lfg b/tex/context/fonts/mkiv/stix-two-math.lfg index b5e6daf29..8b03a7730 100644 --- a/tex/context/fonts/mkiv/stix-two-math.lfg +++ b/tex/context/fonts/mkiv/stix-two-math.lfg @@ -3,6 +3,8 @@ local integral_variants = { bottomright = -0.4 } -- local integral_top = { topright = 0.05 } local integral_bottom = { bottomright = -0.35 } +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets return { name = "stix-two-math", @@ -31,18 +33,18 @@ return { NoLimitSubFactor = 1000, -- AccentBaseHeight = 0, AccentBaseDepth = 30, - FlattenedAccentTopShiftUp = 0, -- now also set, the wide ones (so we can move in one go) - -- AccentExtendMargin = 50, + FlattenedAccentTopShiftUp = 0, + -- AccentExtendMargin = 50, RadicalDegreeBottomRaisePercent = 65, -- RadicalKernBeforeDegree = 500, RadicalKernAfterDegree = -500, RadicalVerticalGap = 10, - -- RadicalRuleThickness = 68, -- 68 in font (but shifted down) + -- RadicalRuleThickness = 68, -- 68 in font (but shifted down) DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1800 in font - PrimeRaisePercent = 75, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + PrimeRaisePercent = 75, -- 50 default + PrimeRaiseComposedPercent = 10, -- 25 default }, tweaks = { aftercopying = { @@ -51,52 +53,39 @@ return { expected = "Version 2.12 b168", }, { + tweak = "fixprimes", + scale = 1, + -- smaller = true, + factor = 1, + }, + { + tweak = "addmirrors", + }, + presets.mathxitsarabic { rscale = 0.95 }, + { + tweak = "simplifykerns", + }, + presets.moveitalics { + correct = true + }, + { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - -- ["0x7D.variants.*"] = { - -- topright = -0.15, - -- bottomright = -0.15, - -- }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.1, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.1, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.2, - bottomright = -0.2, - }, -- 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 - - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + -- ["0x7D.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.1, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.1 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.2, bottomright = -0.2 }, -- 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.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + -- ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom, @@ -106,23 +95,21 @@ 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, - - }, }, - -- 0xFEOO should be chancery style, if present { - tweak = "variants", - kind = "script", - -- feature = false, -- use the saved ones (see typescript) - selector = 0xFE00, - }, - -- 0xFEO1 should be roundhand style, if present - { - tweak = "variants", - kind = "script", - feature = "ss01",-- this changes to roundhand style for stixtwo - selector = 0xFE01, + tweak = "replacealphabets", + list = { + { + source = "uppercasescript", + target = "uppercasecalligraphic", + }, + { + source = "uppercasescript", + target = "uppercasescript", + feature = "ss01", + }, + }, }, -- 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 @@ -138,9 +125,9 @@ return { { 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 + [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 }, }, @@ -149,20 +136,18 @@ return { { 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.025, height = .95, all = true }, -- widedddot : 0x20DB (self) + -- 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.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, @@ -171,13 +156,6 @@ return { tweak = "copyaccents", }, -- So far for the accents. - - { - tweak = "fixprimes", - scale = 1, - -- smaller = true, - factor = 1, - }, { tweak = "checkspacing", }, @@ -204,21 +182,21 @@ return { 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" }, - } - } - } -}, + { + tweak = "addparts", + list = { + [0x21F4] = { + horizontal = true, + template = 0x2192, + sequence = { + { glyph = "first", factor = 2 }, + { glyph = 0x2022, }, + { glyph = "first", factor = 2 }, + { glyph = "last" }, + } + } + } + }, }, }, bigslots = { @@ -226,5 +204,3 @@ return { }, }, } - - diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg index c5bcb3e84..6a54535df 100644 --- a/tex/context/fonts/mkiv/termes-math.lfg +++ b/tex/context/fonts/mkiv/termes-math.lfg @@ -17,11 +17,11 @@ 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 } local integral_bottom = { bottomright = -0.30 } +local common = fonts.goodies.load("common-math.lfg") +local presets = common.mathematics.tweaks.presets return { name = "termes-math", @@ -35,16 +35,16 @@ return { NoLimitSubFactor = 900, AccentTopShiftUp = -15, FlattenedAccentTopShiftUp = -15, - -- AccentExtendMargin = 50, + -- AccentExtendMargin = 50, -- AccentBaseHeight = 0, AccentBaseDepth = 50, RadicalDegreeBottomRaisePercent = 60, - RadicalRuleThickness = 46, -- 52 in font + RadicalRuleThickness = 46, -- 52 in font DelimiterPercent = 90, DelimiterShortfall = 400, DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - PrimeRaisePercent = 60, -- 50 default - PrimeRaiseComposedPercent = 10, -- 25 default + PrimeRaisePercent = 60, -- 50 default + PrimeRaiseComposedPercent = 10, -- 25 default }, tweaks = { aftercopying = { @@ -53,81 +53,45 @@ return { expected = "Version 1.543", }, { - tweak = "dimensions", - list = { - [0x1D44F] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- b - [0x1D451] = { xoffset = 0, width = 1, italic = 0, anchor = 0.8 }, -- d - [0x1D452] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- e - [0x0210E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- h - [0x1D458] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- k - [0x1D453] = { xoffset = 0.6, width = 1.4, italic = 1.2, anchor = 1.5 }, -- f - [0x1D457] = { xoffset = 0.5, width = 1.3, italic = 1.7 }, -- j - [0x1D45D] = { xoffset = 0.15, width = 1.15, italic = 0, anchor = 1.4 }, -- p - [0x1D45E] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- q - [0x1D464] = { xoffset = 0, width = 1, italic = 0, anchor = 1.1 }, -- w - [0x1D6FE] = { xoffset = 0, width = 1, italic = 0, anchor = 1.1 }, -- \gamma - [0x1D706] = { xoffset = 0, width = 1, italic = 0, anchor = 1.05 }, -- \lambda - [0x1D70A] = { xoffset = 0, width = 1, italic = 0, anchor = 1.2 }, -- \omicron - [0x1D70F] = { xoffset = 0, width = 1, italic = 0, anchor = 1.05 }, -- \tau - }, + tweak = "fixprimes", + scale = 0.85, + -- smaller = true, + factor = 0.95, + }, + { + tweak = "addmirrors", }, + presets.matheulercalligraphic { rscale = 0.95 }, + presets.mathrsfscript { rscale = 0.95 }, + presets.mathxitsarabic { rscale = 0.88 }, + presets.moveitalics { correct = true }, { tweak = "kerns", list = { - [0x2F] = { - topleft = -0.2, - -- bottomleft = 0, - -- topright = 0, - bottomright = -0.2, - }, - - - ["0x7D.parts.top"] = { - topright = -0.15, - }, -- right brace top - ["0x7D.parts.bottom"] = { - bottomright = -0.15, - }, -- right brace bottom - ["0x7D.variants.*"] = { - topright = -0.1, - bottomright = -0.1, - }, -- right brace variants - ["0x29.parts.top"] = { - topright = -0.1, - }, -- right parenthesis top - ["0x29.parts.bottom"] = { - bottomright = -0.1, - }, -- right parenthesis bottom - ["0x29.variants.*"] = { - topright = -0.15, - bottomright = -0.15, - }, -- 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 - - -- angle - [0x27E9] = { topright = -0.1, bottomright = -0.1 }, - ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - [0x27EB] = { topright = -0.1, bottomright = -0.1 }, - ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, - - ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, - ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, - ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom, - ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom, - ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom, - ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom, - ["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, + [0x002F] = { topleft = -0.2, bottomright = -0.2 }, + ["0x7D.parts.top"] = { topright = -0.15, }, -- right brace top + ["0x7D.parts.bottom"] = { bottomright = -0.15 }, -- right brace bottom + ["0x7D.variants.*"] = { topright = -0.1, bottomright = -0.1 }, -- right brace variants + ["0x29.parts.top"] = { topright = -0.1, }, -- right parenthesis top + ["0x29.parts.bottom"] = { bottomright = -0.1 }, -- right parenthesis bottom + ["0x29.variants.*"] = { topright = -0.15, bottomright = -0.15 }, -- 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.1, bottomright = -0.1 }, -- angle + ["0x27E9.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + [0x27EB] = { topright = -0.1, bottomright = -0.1 }, + ["0x27EB.variants.*"] = { topright = -0.2, bottomright = -0.2 }, + -- + ["0x222B.variants.*"] = integral_variants, ["0x222B.parts.top"] = integral_top, ["0x222B.parts.bottom"] = integral_bottom, + ["0x222C.variants.*"] = integral_variants, ["0x222C.parts.top"] = integral_top, ["0x222C.parts.bottom"] = integral_bottom, + ["0x222D.variants.*"] = integral_variants, ["0x222D.parts.top"] = integral_top, ["0x222D.parts.bottom"] = integral_bottom, + ["0x222E.variants.*"] = integral_variants, ["0x222E.parts.top"] = integral_top, ["0x222E.parts.bottom"] = integral_bottom, + ["0x222F.variants.*"] = integral_variants, ["0x222F.parts.top"] = integral_top, ["0x222F.parts.bottom"] = integral_bottom, + ["0x2230.variants.*"] = integral_variants, ["0x2230.parts.top"] = integral_top, ["0x2230.parts.bottom"] = integral_bottom, + ["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 @@ -155,20 +119,18 @@ return { { 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) + -- 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, @@ -177,13 +139,6 @@ return { tweak = "copyaccents", }, -- So far for the accents. - - { - tweak = "fixprimes", - scale = 0.85, - -- smaller = true, - factor = 0.95, - }, { tweak = "checkspacing", }, @@ -225,3 +180,25 @@ return { kerns = kerns, }, } + + + -- Do a testrun with hats on these: + -- { + -- tweak = "dimensions", + -- list = { + -- [0x1D44F] = { width = 1, italic = 0, anchor = 1.3 }, -- b + -- [0x1D451] = { width = 1, italic = 0, anchor = 0.8 }, -- d + -- [0x1D452] = { width = 1, italic = 0, anchor = 0.9 }, -- e + -- [0x0210E] = { width = 1, italic = 0, anchor = 1.3 }, -- h + -- [0x1D458] = { width = 1, italic = 0, anchor = 1.3 }, -- k + -- [0x1D453] = { xoffset = 0.6, width = 1.4, italic = 1.2, anchor = 1.5 }, -- f + -- [0x1D457] = { xoffset = 0.5, width = 1.3, italic = 1.7 }, -- j + -- [0x1D45D] = { xoffset = 0.15, width = 1.15, italic = 0, anchor = 1.4 }, -- p + -- [0x1D45E] = { width = 1, italic = 0, anchor = 0.9 }, -- q + -- [0x1D464] = { width = 1, italic = 0, anchor = 1.1 }, -- w + -- [0x1D6FE] = { width = 1, italic = 0, anchor = 1.1 }, -- \gamma + -- [0x1D706] = { width = 1, italic = 0, anchor = 1.05 }, -- \lambda + -- [0x1D70A] = { width = 1, italic = 0, anchor = 1.2 }, -- \omicron + -- [0x1D70F] = { width = 1, italic = 0, anchor = 1.05 }, -- \tau + -- }, + -- }, diff --git a/tex/context/fonts/mkiv/type-imp-concrete.mkiv b/tex/context/fonts/mkiv/type-imp-concrete.mkiv index 72b0141a5..5e4e6bc76 100644 --- a/tex/context/fonts/mkiv/type-imp-concrete.mkiv +++ b/tex/context/fonts/mkiv/type-imp-concrete.mkiv @@ -1,50 +1,62 @@ +%D \module +%D [ file=type-imp-erewhon, +%D version=2022.30.09, % a bit older +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=\TEX Gyre Fonts, +%D author=Mikael Sundqvist, +%D date=\currentdate, +%D copyright={\CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + %\loadtypescriptfile[texgyre] %\resetfontfallback [concrete-euler-fix] %\definefontfallback[concrete-euler-fix][texgyrepagella-math] [0x022EE,0x022F0,0x022F1,0x02661,0x02220][force=yes] - \starttypescriptcollection[concrete] %\definefontfeature[default-slanted-concrete][default][slant=.2] %\definefontfeature[none-slanted-concrete] [none] [slant=.2] \starttypescript [\s!serif] [concrete-serif] - \definefontsynonym [\s!Serif] [\s!file:cmunorm] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:cmunoti] [\s!features=\s!default] - \definefontsynonym [\s!SerifSlanted] [\s!file:cmunorm] [\s!features=default-slanted-concrete] - \definefontsynonym [\s!SerifBold] [\s!file:cmunobx] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunobi] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldSlanted][\s!file:cmunobx] [\s!features=default-slanted-concrete] + \definefontsynonym [\s!Serif] [\s!file:cmunorm] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:cmunoti] [\s!features=\s!default] + \definefontsynonym [\s!SerifSlanted] [\s!file:cmunorm] [\s!features=default-slanted-concrete] + \definefontsynonym [\s!SerifBold] [\s!file:cmunobx] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:cmunobi] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldSlanted] [\s!file:cmunobx] [\s!features=default-slanted-concrete] \stoptypescript \starttypescript [\s!sans] [concrete-sans] - \definefontsynonym [\s!Sans] [\s!file:cmunss] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:cmunsi] [\s!features=\s!default] - \definefontsynonym [\s!SansSlanted] [\s!file:cmunss] [\s!features=default-slanted-concrete] - \definefontsynonym [\s!SansBold] [\s!file:cmunsx] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:cmunso] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldSlanted] [\s!file:cmunsx] [\s!features=default-slanted-concrete] + \definefontsynonym [\s!Sans] [\s!file:cmunss] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:cmunsi] [\s!features=\s!default] + \definefontsynonym [\s!SansSlanted] [\s!file:cmunss] [\s!features=default-slanted-concrete] + \definefontsynonym [\s!SansBold] [\s!file:cmunsx] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic] [\s!file:cmunso] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldSlanted] [\s!file:cmunsx] [\s!features=default-slanted-concrete] \stoptypescript \starttypescript [\s!mono] [concrete-mono] - \definefontsynonym [\s!Mono] [\s!file:cmuntt] [\s!features=\s!none] - \definefontsynonym [\s!MonoItalic] [\s!file:cmunit] [\s!features=\s!none] - \definefontsynonym [\s!MonoSlanted] [\s!file:cmunst] [\s!features=\s!none] - \definefontsynonym [\s!MonoBold] [\s!file:cmuntb] [\s!features=\s!none] - \definefontsynonym [\s!MonoBoldItalic] [\s!file:cmuntx] [\s!features=\s!none] - \definefontsynonym [\s!MonoBoldSlanted] [\s!file:cmuntb] [\s!features=none-slanted-concrete] + \definefontsynonym [\s!Mono] [\s!file:cmuntt] [\s!features=\s!none] + \definefontsynonym [\s!MonoItalic] [\s!file:cmunit] [\s!features=\s!none] + \definefontsynonym [\s!MonoSlanted] [\s!file:cmunst] [\s!features=\s!none] + \definefontsynonym [\s!MonoBold] [\s!file:cmuntb] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldItalic] [\s!file:cmuntx] [\s!features=\s!none] + \definefontsynonym [\s!MonoBoldSlanted] [\s!file:cmuntb] [\s!features=none-slanted-concrete] \stoptypescript \starttypescript [\s!math] [concrete-math] [\s!name] \loadfontgoodies[concrete-math] - \definefontsynonym[\s!MathRoman] [\s!file:Concrete-Math.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=concrete-math] + \definefontsynonym[\s!MathRoman] [\s!file:Concrete-Math.otf] [\s!features={\s!math\mathsizesuffix,mathextra,concrete:mathextra},\s!goodies=concrete-math] \stoptypescript \starttypescript [concrete] \definetypeface [concrete] [\s!rm] [\s!serif] [concrete-serif] [\s!default] - \definetypeface [concrete] [\s!ss] [\s!sans] [concrete-sans] [\s!default] - \definetypeface [concrete] [\s!tt] [\s!mono] [concrete-mono] [\s!default] - \definetypeface [concrete] [\s!mm] [\s!math] [concrete-math] [\s!default] + \definetypeface [concrete] [\s!ss] [\s!sans] [concrete-sans] [\s!default] + \definetypeface [concrete] [\s!tt] [\s!mono] [concrete-mono] [\s!default] + \definetypeface [concrete] [\s!mm] [\s!math] [concrete-math] [\s!default] \quittypescriptscanning \stoptypescript diff --git a/tex/context/fonts/mkiv/type-imp-erewhon.mkiv b/tex/context/fonts/mkiv/type-imp-erewhon.mkiv index b8efcd7f9..8f38fb8b0 100644 --- a/tex/context/fonts/mkiv/type-imp-erewhon.mkiv +++ b/tex/context/fonts/mkiv/type-imp-erewhon.mkiv @@ -1,44 +1,56 @@ +%D \module +%D [ file=type-imp-erewhon, +%D version=2022.30.09, % a bit older +%D title=\CONTEXT\ Typescript Macros, +%D subtitle=\TEX Gyre Fonts, +%D author=Mikael Sundqvist, +%D date=\currentdate, +%D copyright={\CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + %\loadtypescriptfile[texgyre] -%\resetfontfallback [erewhon-euler-fix] +%\resetfontfallback [erewhon-euler-fix] %\definefontfallback[erewhon-euler-fix][texgyrepagella-math] [0x022EE,0x022F0,0x022F1,0x02661,0x02220][force=yes] - \starttypescriptcollection[erewhon] %\definefontfeature[default-slanted-erewhon][default][slant=.2] %\definefontfeature[none-slanted-erewhon] [none] [slant=.2] \starttypescript [\s!serif] [erewhon-serif] - \definefontsynonym [\s!Serif] [\s!file:Erewhon-Regular] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!file:Erewhon-Italic] [\s!features=\s!default] - \definefontsynonym [\s!SerifSlanted] [\s!file:Erewhon-RegularSlanted] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!file:Erewhon-Bold] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!file:Erewhon-BoldItalic] [\s!features=\s!default] + \definefontsynonym [\s!Serif] [\s!file:Erewhon-Regular] [\s!features=\s!default] + \definefontsynonym [\s!SerifItalic] [\s!file:Erewhon-Italic] [\s!features=\s!default] + \definefontsynonym [\s!SerifSlanted] [\s!file:Erewhon-RegularSlanted][\s!features=\s!default] + \definefontsynonym [\s!SerifBold] [\s!file:Erewhon-Bold] [\s!features=\s!default] + \definefontsynonym [\s!SerifBoldItalic] [\s!file:Erewhon-BoldItalic] [\s!features=\s!default] \definefontsynonym [\s!SerifBoldSlanted][\s!file:Erewhon-BoldSlanted] [\s!features=\s!default] \stoptypescript \starttypescript [\s!sans] [cabin-sans] - \definefontsynonym [\s!Sans] [\s!file:Cabin-Regular] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!file:Cabin-Italic] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!file:Cabin-SemiBold] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!file:Cabin-SemiBoldItalic] [\s!features=\s!default] + \definefontsynonym [\s!Sans] [\s!file:Cabin-Regular] [\s!features=\s!default] + \definefontsynonym [\s!SansItalic] [\s!file:Cabin-Italic] [\s!features=\s!default] + \definefontsynonym [\s!SansBold] [\s!file:Cabin-SemiBold] [\s!features=\s!default] + \definefontsynonym [\s!SansBoldItalic][\s!file:Cabin-SemiBoldItalic][\s!features=\s!default] \stoptypescript \starttypescript [\s!mono] [inconsolata-mono] - \definefontsynonym [\s!Mono] [\s!file:Inconsolatazi4-Regular] [\s!features=\s!none] - \definefontsynonym [\s!MonoBold] [\s!file:Inconsolatazi4-Bold] [\s!features=\s!none] + \definefontsynonym [\s!Mono] [\s!file:Inconsolatazi4-Regular][\s!features=\s!none] + \definefontsynonym [\s!MonoBold][\s!file:Inconsolatazi4-Bold] [\s!features=\s!none] \stoptypescript \starttypescript [\s!math] [erewhon-math] [\s!name] \loadfontgoodies[erewhon-math] - \definefontsynonym[\s!MathRoman] [\s!file:Erewhon-Math.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=erewhon-math] + \definefontsynonym [\s!MathRoman] [\s!file:Erewhon-Math.otf] [\s!features={\s!math\mathsizesuffix,erewhon:mathextra,mathextra},\s!goodies=erewhon-math] \stoptypescript \starttypescript [erewhon] - \definetypeface [erewhon] [\s!rm] [\s!serif] [erewhon-serif] [\s!default] - \definetypeface [erewhon] [\s!ss] [\s!sans] [cabin-sans] [\s!default] + \definetypeface [erewhon] [\s!rm] [\s!serif] [erewhon-serif] [\s!default] + \definetypeface [erewhon] [\s!ss] [\s!sans] [cabin-sans] [\s!default] \definetypeface [erewhon] [\s!tt] [\s!mono] [inconsolata-mono] [\s!default] [\s!rscale=1.1] - \definetypeface [erewhon] [\s!mm] [\s!math] [erewhon-math] [\s!default] + \definetypeface [erewhon] [\s!mm] [\s!math] [erewhon-math] [\s!default] \quittypescriptscanning \stoptypescript diff --git a/tex/context/fonts/mkiv/type-imp-euler.mkiv b/tex/context/fonts/mkiv/type-imp-euler.mkiv index 00df63458..1aea88aae 100644 --- a/tex/context/fonts/mkiv/type-imp-euler.mkiv +++ b/tex/context/fonts/mkiv/type-imp-euler.mkiv @@ -66,15 +66,11 @@ \stoptypescript \starttypescript [\s!math] [euleroverpagella] [\s!name] - \definefontsynonym [MathRoman] [texgyrepagella-math] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=euleroverpagella% - ,\s!goodies=pagella-with-euler-math% - ] + \definefontsynonym [MathRoman] [texgyrepagella-math] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=euleroverpagella,\s!goodies=pagella-with-euler-math] \stoptypescript \starttypescript [\s!math] [pagellaovereuler] [\s!name] - \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=pagellaovereuler% - ,\s!goodies=euler-with-pagella-math% - ] + \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=pagellaovereuler,\s!goodies=euler-with-pagella-math] \stoptypescript \starttypescript [pagella-with-euler] diff --git a/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv b/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv index cf5052c82..e8e8e353b 100644 --- a/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv +++ b/tex/context/fonts/mkiv/type-imp-latinmodern.mkiv @@ -181,8 +181,8 @@ \starttypescript [\s!math] [modern,latin-modern] \loadfontgoodies[lm] - \definefontsynonym [LMMathRoman-Regular] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math,mathextra},\s!goodies=lm] - \definefontsynonym [LMMathRoman-Bold] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm-math-bold,lm-math,mathextra},\s!goodies=lm] + \definefontsynonym [LMMathRoman-Regular] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm:mathextra,lm-math,mathextra},\s!goodies=lm] + \definefontsynonym [LMMathRoman-Bold] [\v!file:latinmodern-math-regular.otf] [\s!features={\s!math\mathsizesuffix,lm:mathextra,lm-math-bold,lm-math,mathextra},\s!goodies=lm] \stoptypescript \starttypescript [modern-designsize-virtual] diff --git a/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv b/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv index 1c9788a98..73f7c4dbf 100644 --- a/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv +++ b/tex/context/fonts/mkiv/type-imp-newcomputermodern.mkiv @@ -50,7 +50,7 @@ \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!MathRomanBold][\s!file:newcmmath-regular][\s!features={\s!math\mathsizesuffix,newcomputermodern-math-bold,mathextra},\s!goodies=lm] \stoptypescript \starttypescript [\s!serif] [newcomputermodern-book] [\s!name] diff --git a/tex/context/fonts/mkiv/type-imp-stix.mkiv b/tex/context/fonts/mkiv/type-imp-stix.mkiv index b76b1d09b..ed2b63909 100644 --- a/tex/context/fonts/mkiv/type-imp-stix.mkiv +++ b/tex/context/fonts/mkiv/type-imp-stix.mkiv @@ -35,32 +35,11 @@ \starttypescriptcollection[stix] - % version one - - \starttypescript [\s!math] [stix] [\s!name] - \definefontsynonym[MathRoman][\s!file:stixmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra}] - \stoptypescript - - \starttypescript [\s!serif] [stix] [\s!name] - \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym[\s!Serif] [\s!file:stix-regular.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifBold] [\s!file:stix-bold.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifItalic] [\s!file:stix-italic.otf] [\s!features=\s!default] - \definefontsynonym[\s!SerifBoldItalic][\s!file:stix-bolditalic.otf][\s!features=\s!default] - \stoptypescript - - \starttypescript[stix] - \definetypeface [stix] [\s!rm] [\s!serif] [stix] [\s!default] - \definetypeface [stix] [\s!mm] [\s!math] [stix] [\s!default] - \stoptypescript - - % version two - - \starttypescript [\s!math] [stixtwo] [\s!name] - \definefontsynonym[MathRoman][\s!file:stixtwomath-regular.otf] [\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math] + \starttypescript [\s!math] [stix,stixtwo,xits] [\s!name] + \definefontsynonym[\s!MathRoman][\s!file:stixtwomath-regular.otf][\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math] \stoptypescript - \starttypescript [\s!serif] [stixtwo] [\s!name] + \starttypescript [\s!serif] [stix,stixtwo,xits] [\s!name] \setups[\s!font:\s!fallback:\s!serif] \definefontsynonym[\s!Serif] [\s!file:stixtwotext-regular.otf] [\s!features=\s!default] \definefontsynonym[\s!SerifBold] [\s!file:stixtwotext-bold.otf] [\s!features=\s!default] @@ -68,11 +47,11 @@ \definefontsynonym[\s!SerifBoldItalic][\s!file:stixtwotext-bolditalic.otf][\s!features=\s!default] \stoptypescript - \starttypescript[stixtwo] + \starttypescript[stix,stixtwo,xits] \definetypeface [\typescriptone] [\s!rm] [\s!serif] [stixtwo] [\s!default] \definetypeface [\typescriptone] [\s!ss] [\s!serif] [stixtwo] [\s!default] \definetypeface [\typescriptone] [\s!tt] [\s!mono] [dejavu] [\s!default] [\s!rscale=0.895] - \definetypeface [\typescriptone] [\s!mm] [\s!math] [stixtwo] [\s!default] + \definetypeface [\typescriptone] [\s!mm] [\s!math] [stixtwo] [\s!default] [\s!direction=\s!both] \stoptypescript \stoptypescriptcollection diff --git a/tex/context/fonts/mkiv/type-imp-texgyre.mkiv b/tex/context/fonts/mkiv/type-imp-texgyre.mkiv index 24b982bb5..c6b0ab28b 100644 --- a/tex/context/fonts/mkiv/type-imp-texgyre.mkiv +++ b/tex/context/fonts/mkiv/type-imp-texgyre.mkiv @@ -229,7 +229,14 @@ \stoptypescriptcollection -% tricky: we cannot mix now as the file is loaded only once +% We no longer support tx and px in LMTX. These fonts were used in the transition from +% traditional (type one) fonts to the new gyre fonts. The LMTX distribution no longer +% ships these fonts anyway. + +\ifcase\contextlmtxmode \else + \disablemode[pxmath] + \disablemode[txmath] +\fi \startmode[txmath] @@ -252,8 +259,8 @@ \starttypescript [\s!math][times,termes][\s!all] % \loadfontgoodies[texgyre] % \definefontsynonym[\s!MathRoman][file:texgyre-termes-math-regular.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=texgyre] - \definefontsynonym[\s!MathRoman] [file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=termes-math] - \definefontsynonym[\s!MathRomanBold][file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes-math-bold,mathextra},\s!goodies=termes-math] + \definefontsynonym[\s!MathRoman] [file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes:mathextra,mathextra},\s!goodies=termes-math] + \definefontsynonym[\s!MathRomanBold][file:texgyretermes-math.otf][\s!features={\s!math\mathsizesuffix,termes:mathextra,termes-math-bold,mathextra},\s!goodies=termes-math] \stoptypescript \stoptypescriptcollection @@ -281,8 +288,8 @@ \starttypescript [\s!math][palatino,pagella][\s!all] % \loadfontgoodies[texgyre] % \definefontsynonym[\s!MathRoman][file:texgyre-pagella-math-regular.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=texgyre] - \definefontsynonym[\s!MathRoman] [file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=pagella-math] - \definefontsynonym[\s!MathRomanBold][file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,pagella-math-bold,mathextra},\s!goodies=pagella-math] + \definefontsynonym[\s!MathRoman] [file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,pagella:mathextra,mathextra},\s!goodies=pagella-math] + \definefontsynonym[\s!MathRomanBold][file:texgyrepagella-math.otf][\s!features={\s!math\mathsizesuffix,pagella:mathextra,pagella-math-bold,mathextra},\s!goodies=pagella-math] \stoptypescript \stoptypescriptcollection @@ -294,8 +301,8 @@ \starttypescript [\s!math][bookman,bonum][\s!all] % \loadfontgoodies[texgyre] % \definefontsynonym[\s!MathRoman][file:texgyre-bonum-math-regular.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=texgyre] - \definefontsynonym[\s!MathRoman] [file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=bonum-math] - \definefontsynonym[\s!MathRomanBold][file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum-math-bold,mathextra},\s!goodies=bonum-math] + \definefontsynonym[\s!MathRoman] [file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum:mathextra,mathextra},\s!goodies=bonum-math] + \definefontsynonym[\s!MathRomanBold][file:texgyrebonum-math.otf][\s!features={\s!math\mathsizesuffix,bonum:mathextra,bonum-math-bold,mathextra},\s!goodies=bonum-math] \stoptypescript \stoptypescriptcollection @@ -305,8 +312,8 @@ \starttypescript [\s!math][schoolbook,schola][\s!all] % \loadfontgoodies[texgyre] % \definefontsynonym[\s!MathRoman][file:texgyre-schola-math-regular.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=texgyre] - \definefontsynonym[\s!MathRoman] [file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=schola-math] - \definefontsynonym[\s!MathRomanBold][file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,schola-math-bold,mathextra},\s!goodies=schola-math] + \definefontsynonym[\s!MathRoman] [file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,schola:mathextra,mathextra},\s!goodies=schola-math] + \definefontsynonym[\s!MathRomanBold][file:texgyreschola-math.otf][\s!features={\s!math\mathsizesuffix,schola:mathextra,schola-math-bold,mathextra},\s!goodies=schola-math] \stoptypescript \stoptypescriptcollection diff --git a/tex/context/fonts/mkiv/type-imp-xits.mkiv b/tex/context/fonts/mkiv/type-imp-xits.mkiv index f2d3e83c3..ce8d4209d 100644 --- a/tex/context/fonts/mkiv/type-imp-xits.mkiv +++ b/tex/context/fonts/mkiv/type-imp-xits.mkiv @@ -25,10 +25,10 @@ \starttypescript [\s!math] [xits,xitsbidi] [\s!name] \loadfontgoodies[xits-math] - \definefontsynonym[\s!MathRoman ][\s!file:xitsmath-regular.otf] [\s!features={\s!math\mathsizesuffix,mathextra,xitsmath},\s!goodies=xits-math] + \definefontsynonym[\s!MathRoman ][\s!file:xitsmath-regular.otf] [\s!features={\s!math\mathsizesuffix ,mathextra,xitsmath},\s!goodies=xits-math] \definefontsynonym[\s!MathRoman L2R][\s!file:xitsmath-regular.otf] [\s!features={\s!math\mathsizesuffix-l2r,mathextra,xitsmath},\s!goodies=xits-math] \definefontsynonym[\s!MathRoman R2L][\s!file:xitsmath-regular.otf] [\s!features={\s!math\mathsizesuffix-r2l,mathextra,xitsmath},\s!goodies=xits-math] - \definefontsynonym[\s!MathRomanBold ][\s!file:xitsmath-bold.otf] [\s!features={\s!math\mathsizesuffix,mathextra,xitsmath},\s!goodies=xits-math] + \definefontsynonym[\s!MathRomanBold ][\s!file:xitsmath-bold.otf] [\s!features={\s!math\mathsizesuffix ,mathextra,xitsmath},\s!goodies=xits-math] \definefontsynonym[\s!MathRomanBold L2R][\s!file:xitsmath-bold.otf] [\s!features={\s!math\mathsizesuffix-l2r,mathextra,xitsmath},\s!goodies=xits-math] \definefontsynonym[\s!MathRomanBold R2L][\s!file:xitsmath-bold.otf] [\s!features={\s!math\mathsizesuffix-r2l,mathextra,xitsmath},\s!goodies=xits-math] \stoptypescript diff --git a/tex/context/fonts/mkiv/xits-math.lfg b/tex/context/fonts/mkiv/xits-math.lfg index cf3050369..374f03a0e 100644 --- a/tex/context/fonts/mkiv/xits-math.lfg +++ b/tex/context/fonts/mkiv/xits-math.lfg @@ -1,3 +1,7 @@ +-- When testing XITS in LMTX one has to do this: +-- +-- \definefilesynonym [type-imp-xits.mkiv] [type-imp-xits.mkiv] + return { name = "xits-math", version = "1.00", @@ -15,6 +19,25 @@ return { }, }, mathematics = { + parameters = { + NoLimitSupFactor = 0, + 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, + RadicalVerticalGap = 10, + -- RadicalRuleThickness = 68, -- 68 in font (but shifted down) + DelimiterPercent = 90, + DelimiterShortfall = 400, + DisplayOperatorMinHeight = 1800, -- 1800 in font + PrimeRaisePercent = 75, -- 50 default + PrimeRaiseComposedPercent = 10, -- 25 default + + }, tweaks = { aftercopying = { { @@ -69,6 +92,10 @@ return { { tweak = "addrules", }, + { + tweak = "setoptions", + set = { "ignorekerndimensions" } + }, }, }, alternates = { |