diff options
Diffstat (limited to 'tex/context/fonts/mkiv/modern-math.lfg')
-rw-r--r-- | tex/context/fonts/mkiv/modern-math.lfg | 233 |
1 files changed, 25 insertions, 208 deletions
diff --git a/tex/context/fonts/mkiv/modern-math.lfg b/tex/context/fonts/mkiv/modern-math.lfg index 4c433702c..fadd13da7 100644 --- a/tex/context/fonts/mkiv/modern-math.lfg +++ b/tex/context/fonts/mkiv/modern-math.lfg @@ -12,36 +12,27 @@ return { copyright = "ConTeXt development team", mathematics = { parameters = { - FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function - -- NoLimitSupFactor = 0, - -- NoLimitSubFactor = 900, - AccentTopShiftUp = -60, - FlattenedAccentTopShiftUp = -60, - -- AccentExtendMargin = 50, - -- AccentBaseHeight = 0, - -- AccentBaseDepth = 0, - -- AccentTopOvershoot = 66, - AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?) - AccentSuperscriptPercent = 0, - DelimiterPercent = 90, - DelimiterShortfall = 400, - -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one) - -- SubSuperscriptGapMin = 160, -- 160 in font (4*ruleheight) - -- SubscriptBaselineDropMin = 50, -- 200 in font (multiplied by 0.59999/2.39868) - SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm) - SubscriptShiftDownWithSuperscript = 247, -- relates to the previous one (see math-act) - -- SubscriptTopMax = 344, -- 344 in font .8 exheight - -- SuperscriptBaselineDropMax = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) 0 means: align the baseline of the superscript at the (top) - SuperscriptBaselineDropMax = 0.6*431, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) - SubscriptBaselineDropMin = 0.1*431, -- 200 in font - -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font .8 exheight - -- SuperscriptBottomMin = 108, -- 108 in font .25 exheight - SuperscriptShiftUp = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413) - SuperscriptShiftUpCramped = 413, -- 289 in font (no distinction, old TeX) + FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function + AccentTopShiftUp = -60, + FlattenedAccentTopShiftUp = -60, + AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?) + AccentSuperscriptPercent = 0, + DelimiterPercent = 90, + DelimiterShortfall = 400, + SubscriptShiftDown = 150, -- 247 in font (multiplied to be consistent with cm) + SubscriptShiftDownWithSuperscript = 247, -- relates to the previous one (see math-act) + -- SubscriptTopMax = 344, -- 344 in font .8 exheight + -- SuperscriptBaselineDropMax = 386, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) 0 means: align the baseline of the superscript at the (top) + SuperscriptBaselineDropMax = 0.6*431, -- 250 in font (multiplied by 4.6333/2.99 (values in cm/values in lm)) + SubscriptBaselineDropMin = 0.1*431, -- 200 in font + -- SuperscriptBottomMaxWithSubscript = 344, -- 344 in font .8 exheight + -- SuperscriptBottomMin = 108, -- 108 in font .25 exheight + SuperscriptShiftUp = 413, -- 363 in font (multiplied with 4.9547/4.3536, got 413) + SuperscriptShiftUpCramped = 413, -- 289 in font (no distinction, old TeX) PrimeShiftUp = "1.1*SuperscriptShiftUp", PrimeShiftUpCramped = "1.1*SuperscriptShiftUp", - -- PrimeRaisePercent = 0, - -- PrimeRaiseComposedPercent = 25, + -- PrimeRaisePercent = 0, -- set to 0 in math-act + -- PrimeRaiseComposedPercent = 0, -- set to 0 in math-act }, tweaks = { aftercopying = { @@ -64,12 +55,9 @@ return { presets.moveintegrals { factor = 1.4, icfactor = 0.8 }, -- the icfactor is due to the very slanted integral. presets.wipeanchors { }, presets.wipeitalics { }, - -- these will become moveanchors { tweak = "dimensions", list = { - -- [0x1D483] = { anchor = 1.15 }, -- bold italic b - -- [0x1D485] = { anchor = 0.8 }, -- bold italic d [0x1D487] = { anchor = 0.9 }, -- bold italic f [0x1D489] = { anchor = 1.2 }, -- bold italic h [0x1D48C] = { anchor = 1.2 }, -- bold italic k @@ -86,13 +74,10 @@ return { [0x1D6FE] = { anchor = 1.1 }, -- italic gamma [0x1D702] = { anchor = 1.1 }, -- italic eta - -- [0x1D70A] = { anchor = 1.2 }, -- italic omicron -- no difference - -- [0x1D70D] = { anchor = 1.2 }, -- italic varsigma -- no difference [0x1D44F] = { anchor = 1.15 }, -- italic b [0x1D451] = { anchor = 0.8, }, -- italic d [0x1D455] = { anchor = 1.15 }, -- italic h - -- [0x1D456] = { anchor = 1.15 }, -- italic i (wrong code?) [0x1D458] = { anchor = 1.15 }, -- italic k [0x1D45B] = { anchor = 1.1 }, -- italic n [0x1D45D] = { anchor = 1.1 }, -- italic p @@ -109,9 +94,7 @@ return { [0x1D46E] = { anchor = 0.75 }, -- bold italic G [0x1D479] = { anchor = 1.2 }, -- bold italic R [0x1D47A] = { anchor = 0.8 }, -- bold italic S - -- uppercaseboldscript could be improved - [0x1D435] = { anchor = 1.05 }, -- italic B [0x1D436] = { anchor = 0.7 }, -- italic C [0x1D437] = { anchor = 1.05 }, -- italic D @@ -119,7 +102,6 @@ return { [0x1D443] = { anchor = 1.1 }, -- italic P [0x1D445] = { anchor = 1.05 }, -- italic R [0x1D446] = { anchor = 0.85 }, -- italic S - [0x1D49C] = { anchor = 0.9 }, -- script A [0x1D49D] = { anchor = 0.95 }, -- script B [0x1D49E] = { anchor = 0.8 }, -- script C @@ -146,18 +128,6 @@ return { [0x1D4B3] = { anchor = 0.95 }, -- script X [0x1D4B4] = { anchor = 0.9 }, -- script Y [0x1D4B5] = { anchor = 1 }, -- script Z - - -- [984874] = { squeeze = 0.50, height = 0.50, depth = 0.50 }, - -- [984881] = { squeeze = 0.50, height = 0.50, depth = 0.50 }, - -- [984888] = { squeeze = 0.50, height = 0.50, depth = 0.50 }, - -- [984895] = { squeeze = 0.50, height = 0.50, depth = 0.50 }, - -- [984902] = { squeeze = 0.50, height = 0.50, depth = 0.50 }, - -- [984909] = { squeeze = 0.50, height = 0.50, depth = 0.50 }, - -- [984916] = { squeeze = 0.50, height = 0.50, depth = 0.50 }, - - -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.75, depth = 0.75, extend = 1.15, width = 1.15 }, -- squeeze: glyph, height, depth: bbox - -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.8, depth = 0.8, extend = 1.1, width = 1.1 }, -- squeeze: glyph, height, depth: bbox - ["0x7C.variants.1"]={ squeeze = 0.90, height = 0.90, depth = 0.90 }, ["0x7C.variants.2"]={ squeeze = 0.85, height = 0.85, depth = 0.85 }, ["0x7C.variants.3"]={ squeeze = 0.80, height = 0.80, depth = 0.80 }, @@ -165,50 +135,20 @@ return { ["0x7C.variants.5"]={ squeeze = 0.80, height = 0.80, depth = 0.80 }, ["0x7C.variants.6"]={ squeeze = 0.80, height = 0.80, depth = 0.80 }, ["0x7C.variants.7"]={ squeeze = 0.80, height = 0.80, depth = 0.80 }, - - -- [utf.byte("1")] = { - -- original = utf.byte("2"), - -- mode = 1, - -- scale = 2, - -- }, - - -- ["lowercasegreeksansserifbolditalic"] = { - -- delta = 0x003B1 - 0x1D7AA, - -- slant = 0.4, - -- slant = -0.2, - -- line = 0.1, - -- mode = 1, - -- width = 1.25, - -- width = 0.95, - -- scale = 0.975, - -- }, }, }, - -- Accents are a mess. We migrate the extensibles from the combiners to the base accent -- and then need to tweak the width (which is auto set because it was zero with a large -- accent anchor offset). First we copy and fix. { tweak = "extendaccents", }, - -{ - tweak = "radicaldegreeanchors", - list = { - -- [0x221A] = { location = "left", hfactor = 0.05, vfactor = .675 }, - -- ["0x221A.variants.*"] = { location = "left", hfactor = 0.05, vfactor = .6 }, - -- ["0x221A.variants.1"] = { location = "left", hfactor = 0.05, vfactor = .65 }, - -- ["0x221A.variants.2"] = { location = "left", hfactor = .1, vfactor = .65 }, - -- ["0x221A.variants.3"] = { location = "left", hfactor = .1, vfactor = .55 }, - -- ["0x221A.variants.4"] = { location = "left", hfactor = .1, vfactor = .55 }, - -- ["0x221A.variants.5"] = { location = "left", hfactor = 0.05, vfactor = .525 }, - -- ["0x221A.variants.5"] = { location = "left", hfactor = .1, vfactor = .55 }, - -- ["0x221Aq.variants.6"] = { location = "left", hfactor = .1, vfactor = .55 }, - -- ["0x221A.parts.top"] = { location = "left", hfactor = .1, vfactor = 5.5 }, -- keep commented: bottom wins over top - ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.05 }, - } -}, - + { + tweak = "radicaldegreeanchors", + list = { + ["0x221A.parts.bottom"] = { location = "left", hfactor = 0.05, vfactor = 1.05 }, + } + }, { tweak = "fixaccents", }, @@ -217,12 +157,9 @@ return { { tweak = "dimensions", list = { - -- [0x00300] = { width = 0.8 }, -- widegrave - -- [0x00301] = { width = 0.9 }, -- wideacute [0x00302] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widehat [0x00303] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widetilde [0x00306] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widebreve - -- [0x0030A] = { width = 0.9, xoffset = -.0 }, -- widering [0x0030C] = { width = 1.4, anchor = 1.20, xoffset = .10 }, -- widecheck }, }, @@ -231,17 +168,6 @@ 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) }, }, @@ -251,7 +177,6 @@ return { tweak = "copyaccents", }, -- So far for the accents. - { -- Here we modify "corner kerns". -- We started with 0x2F, the solidus @@ -305,11 +230,6 @@ return { }, }, - -- { - -- tweak = "staircase", - -- list = { - -- }, - -- }, { -- This one fakes margins to get larger/smaller accents -- with for example \widetilde. @@ -355,7 +275,6 @@ return { [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 @@ -364,7 +283,6 @@ return { [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 @@ -373,7 +291,6 @@ return { [0x1D4AE] = { left = .1, right = .1 }, -- script S [0x1D4B4] = { left = .1, right = .1 }, -- script Y - -- [0x0004A] = { left = .2, right = .2 }, -- J [0x0004C] = { left = .1, right = .1 }, -- L [0x00053] = { left = .1, right = .1 }, -- S [0x0005A] = { left = .1, right = .1 }, -- Z @@ -387,9 +304,6 @@ return { { tweak = "fixprimes", factor = 0.825, - -- smaller = true, - -- scale = 1, - -- fake = 0.6, }, { tweak = "checkspacing", @@ -426,12 +340,6 @@ return { { tweak = "addequals", }, - -- { - -- tweak = "wipevariants", - -- list = { - -- 0x7C, - -- }, - -- }, -- this is the mkiv section { tweak = "emulatelmtx", @@ -441,98 +349,7 @@ return { }, }, bigslots = { - -- 1, 3, 5, 7 -- In fact, 7 is the last one. 1, 4, 6, 7 -- In fact, 7 is the last one. }, }, } - --- For now we keep these commented as they show where we came from. - --- [0x00060] = { yoffset = -0.05 }, -- grave --- [0x000B4] = { yoffset = -0.05 }, -- acute --- [0x002C6] = { yoffset = -0.05 }, -- hat --- [0x002DC] = { yoffset = -0.05 }, -- tilde --- [0x000AF] = { yoffset = -0.075 }, -- bar --- [0x002D8] = { yoffset = -0.05 }, -- breve --- [0x002D9] = { yoffset = -0.05 }, -- dot --- [0x000A8] = { yoffset = -0.05 }, -- ddot --- [0x020DB] = { yoffset = 0.2 }, -- dddot (done below!) --- [0x002DA] = { width = 0 }, -- ring (bounding box is wrong) --- [0x002C7] = { yoffset = -0.05 }, -- check --- [0x020D7] = { yoffset = -0.05 }, -- vec - --- [0x00300] = { yoffset = -0.03, all = true }, -- widegrave --- [0x00301] = { yoffset = -0.03, all = true }, -- wideacute --- [0x00302] = { yoffset = -0.075, all = true }, -- widehat --- [0x00303] = { yoffset = -0.05, all = true }, -- widetilde --- [0x00304] = { yoffset = -0.02, all = true }, -- widebar --- [0x00306] = { yoffset = -0.05, all = true }, -- widebreve --- [0x00307] = { yoffset = -0.027, all = true }, -- widedot --- [0x00308] = { yoffset = -0.027, all = true }, -- wideddot --- [0x020DB] = { yoffset = -0.065, all = true }, -- widedddot --- [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck --- [0x0030A] = { yoffset = -0.025, all = true }, -- widering - --- [0x0212C] = { width = 0.95, italic = 0.05 }, -- script B --- [0x1D49E] = { width = 0.8, italic = 0.25 }, -- script C --- [0x1D49F] = { width = 0.9, italic = 0.11 }, -- script D --- [0x02130] = { width = 0.85, italic = 0.18 }, -- script E --- [0x02131] = { width = 0.75, italic = 0.3 }, -- script F --- [0x1D4A2] = { width = 0.9, italic = 0.11 }, -- script G --- [0x0210B] = { width = 0.85, italic = 0.18 }, -- script H --- [0x02110] = { width = 0.8, italic = 0.25 }, -- script I --- [0x1D4A5] = { width = 0.8, italic = 0.25 }, -- script J --- [0x1D4A6] = { width = 0.9, italic = 0.11 }, -- script K --- [0x02112] = { width = 0.95, italic = 0.05 }, -- script L --- [0x02133] = { width = 0.9, italic = 0.11 }, -- script M --- [0x1D4A9] = { width = 0.85, italic = 0.18 }, -- script N --- [0x1D4AA] = { width = 0.95, italic = 0.05 }, -- script O --- [0x1D4AB] = { width = 0.8, italic = 0.25 }, -- script P --- [0x1D4AB] = { width = 0.95, italic = 0.05 }, -- script Q --- [0x0211B] = { width = 0.95, italic = 0.05 }, -- script R --- [0x1D4AE] = { width = 0.9, italic = 0.11 }, -- script S --- [0x1D4AF] = { width = 0.75, italic = 0.33 }, -- script T --- [0x1D4B0] = { width = 0.9, italic = 0.11 }, -- script U --- [0x1D4B1] = { width = 0.8, italic = 0.25 }, -- script V --- [0x1D4B2] = { width = 0.8, italic = 0.25 }, -- script W --- [0x1D4B3] = { width = 0.9, italic = 0.11 }, -- script X --- [0x1D4B4] = { width = 0.85, italic = 0.18 }, -- script Y --- [0x1D4B5] = { width = 0.95, italic = 0.05 }, -- script Z - --- Setting anchors to shift the location of accents --- Note: Many non-italic alphabets are wiped below --- Todo: Check the less common italic alphabets - --- { --- -- 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", --- }, --- }, |