Skip to content

Commit 48c256f

Browse files
committed
Merge pull request wikimedia#20 from physikerwelt/dpi
Use dpi setting for PNG generation
2 parents 9247431 + cde6e75 commit 48c256f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/mj-single.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var defaults = {
5959
svg: false, // return svg output?
6060
mathoidStyle: false, // return mathoidStyle tag for remote image?
6161
png: false, // return png image (as data: URL)?
62-
dpi: 144, // dpi for png image
62+
dpi: 180, // dpi for png image
6363

6464
speakText: false, // add spoken annotations to svg output?
6565
speakRuleset: "mathspeak", // set speech ruleset (default (chromevox rules), mathspeak)
@@ -507,7 +507,7 @@ function GetSVG(result) {
507507
//
508508
function GetPNG(result) {
509509
var s = new Readable();
510-
var pngScale = 2;
510+
var pngScale = data.dpi / 90; // 90 DPI is the effective setting used by librsvg
511511
var svgFile = result.svgfile; result.svgfile=undefined;
512512
var width = result.width; result.width=undefined;
513513
var height = result.height; result.height=undefined;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mathoid-mathjax-node",
3-
"version": "0.6.3",
3+
"version": "0.6.4",
44
"description": "API's for calling MathJax from node.js",
55
"keywords": [
66
"MathJax",

0 commit comments

Comments
 (0)