diff --git a/src/component/plotly-graph/constants.js b/src/component/plotly-graph/constants.js index 9dc77cfc..3007ef21 100644 --- a/src/component/plotly-graph/constants.js +++ b/src/component/plotly-graph/constants.js @@ -33,7 +33,8 @@ module.exports = { }, mathJaxConfigQuery: '?config=TeX-AMS-MML_SVG', - + mathJaxFontQuery: 'if (window.MathJax) {MathJax.Hub.Config({SVG: {blacker: 1, font: "STIX-Web"}});}', + // config option passed in render step plotGlPixelRatio: 2.5, diff --git a/src/component/plotly-graph/inject.js b/src/component/plotly-graph/inject.js index 8a56b9a7..f96ccae4 100644 --- a/src/component/plotly-graph/inject.js +++ b/src/component/plotly-graph/inject.js @@ -23,6 +23,7 @@ function inject (opts = {}) { let src = resolve(mathjax) if (src) { parts.push(script(src + cst.mathJaxConfigQuery)) + parts.push(scriptMathJaxFont(cst.mathJaxFontQuery)) } else { throw new Error('Provided path to MathJax files does not exists') } @@ -66,6 +67,10 @@ function script (src) { return `` } +function scriptMathJaxFont (opts) { + return `` +} + function cdnSrc (v) { v = v.charAt(0) === 'v' ? v.slice(1) : v return `https://cdn.plot.ly/plotly-${v}.min.js`