Skip to content

Commit

Permalink
Make SVG honor the scale configuration option. (mathjax/MathJax#2376)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Mar 21, 2020
1 parent 2d7045b commit 99d5bac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ts/output/svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {SVGFontData} from './svg/FontData.js';
import {TeXFont} from './svg/fonts/tex.js';
import {StyleList as CssStyleList} from './common/CssStyles.js';
import {FontCache} from './svg/FontCache.js';
import {percent} from '../util/lengths.js';

export const SVGNS = "http://www.w3.org/2000/svg";
export const XLINKNS = 'http://www.w3.org/1999/xlink';
Expand Down Expand Up @@ -129,12 +130,12 @@ CommonOutputJax<N, T, D, SVGWrapper<N, T, D>, SVGWrapperFactory<N, T, D>, SVGFon
}

/**
* Don't set the scaling factor for the container (that is handled by the
* viewBox and height and width settings)
*
* @override
*/
protected setScale(node: N) {
if (this.options.scale !== 1) {
this.adaptor.setStyle(node, 'fontSize', percent(this.options.scale));
}
}

/**
Expand Down

0 comments on commit 99d5bac

Please sign in to comment.