Skip to content

Commit

Permalink
Merge pull request #460 from mathjax/issue2376
Browse files Browse the repository at this point in the history
Make SVG honor the scale configuration option.  (mathjax/MathJax#2376)
  • Loading branch information
dpvc committed Apr 3, 2020
2 parents a926b59 + 99d5bac commit b8ba578
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 b8ba578

Please sign in to comment.