-- This patch code is moved from font-pat.lua to this goodies -- files as it does not belong in the core code. -- This is a fix to the font itself i.e. the cached instance will -- be patched. When the goodie file is loaded the patch will be -- added to the patch list. No goodies setting is needed with -- the filename. local dimensions, kerns, kernpairs if CONTEXTLMTXMODE == 0 then kernpairs = { -- \setupmathematics[kernpairs=yes] [0x1D44E] = { [0x1D44F] = 1000, -- 𝑎𝑏 demo } } kerns = { [0x1D453] = { force = true, topright = { { kern = 1000, }, }, bottomright = { { kern = 1000, }, }, }, } end -- local patches = fonts.handlers.otf.enhancers.patches -- -- local function patch(data,filename,threshold) -- local m = data.metadata.math -- if m then -- local d = m.DisplayOperatorMinHeight or 0 -- if d < threshold then -- patches.report("DisplayOperatorMinHeight(%s -> %s)",d,threshold) -- m.DisplayOperatorMinHeight = threshold -- end -- end -- end -- -- patches.register("after","analyze math","cambria", function(data,filename) patch(data,filename,2800) end) -- patches.register("after","analyze math","cambmath",function(data,filename) patch(data,filename,2800) end) return { name = "cambria-math", version = "1.00", comment = "Goodies that complement cambria.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { parameters = { NoLimitSupFactor = 0, NoLimitSubFactor = 1000, DisplayOperatorMinHeight = 2800, AccentBaseDepth = 300, }, 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] = { 0.25, 1.15, 0.2 }, -- J [0x1D487] = { anchor = 0.8 }, -- bold lower case italic f -- [0x1D487] = { 0, 1, 0, 1.3}, -- bold lower case italic f }, }, { tweak = "fixprimes", scale = 0.9, -- smaller = true, factor = 0.9, }, { tweak = "checkspacing", }, { tweak = "addscripts", }, { tweak = "accentdimensions", list = { "over", "under" }, -- list = { -- [0x203E] = { factor = "over" }, -- overbar -- [0x203E] = { factor = "under" }, -- underbar -- [0x23DE] = { factor = "over" }, -- overbrace -- [0x23DF] = { factor = "under" }, -- underbrace -- [0x23DC] = { factor = "over" }, -- overparent -- [0x23DD] = { factor = "under" }, -- underparent -- [0x23B4] = { factor = "over" }, -- overbracket -- [0x23B5] = { factor = "under" }, -- underbracket -- } }, { tweak = "addrules", }, }, }, bigslots = { 1, 2, 3, 4 }, -- -- experimental fixes for mkiv: -- dimensions = dimensions, kerns = kerns, kernpairs = kernpairs, }, }