Last modified: 2014-11-18 18:04:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74553, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72553 - Font size problems in MathML with SVG or PNG fallback mode
Font size problems in MathML with SVG or PNG fallback mode
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Math (Other open bugs)
unspecified
Macintosh Mac OS X 10.9
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-27 10:08 UTC by Richard Morris
Modified: 2014-11-18 18:04 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Richard Morris 2014-10-27 10:08:31 UTC
Looking at https://en.wikipedia.org/wiki/Squared_triangular_number using chrome on a Mac the font size used in the linline equations seems to be too big. Ideally the font size would match the surrounding text. Another user mentioned the maths appears too bold, which might be a font size issue.
https://en.wikipedia.org/w/index.php?title=Wikipedia_talk:WikiProject_Mathematics&diff=631269666&oldid=631253822
Comment 1 Gabriel Wicke 2014-10-27 16:51:28 UTC
I see something similar on linux. For SVGs, MathJax emits sizes and offsets in ex, which is the x-height of the CSS font. This ensures that the math scales relative to the CSS font. However, exactly matching the size of the text might not be desirable, as small parts like indices might get hard to read. 

There are some parameters we can tweak: http://docs.mathjax.org/en/latest/options/SVG.html

It is possible that the increased size is caused by minScaleAdjust, which aims to ensure that small indices remain legible. Another setting to look into is matchFontHeight. We'll have to experiment a bit.
Comment 2 Peter Krautzberger 2014-10-28 07:19:57 UTC
@Gabriel in case it's not clear, those options refer to MathJax not MathJax-node. To make these work in MathJax-node you'd have to load a richer page template and use not just a DOM simulator like jsdom but a full HTML/CSS engine. 

Long story short, you can specify ex height in MathJax-node https://github.com/mathjax/MathJax-node/blob/master/lib/mj-single.js#L42

However, assuming Wikipedia's CSS has several font options, there's a good chance somebody will always see sub-optimal results. No way around this with static images.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links