Skip to content

Fix problem with Plane1 not being mapped to the MathJax fonts properly #1457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions unpacked/jax/output/CommonHTML/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,10 @@
getCharList: function (variant,n) {
var id, M, list = [], cache = variant.cache, nn = n;
if (cache[n]) return cache[n];
if (n > 0xFFFF && this.FONTDATA.RemapPlane1) {
var nv = this.FONTDATA.RemapPlane1(n,variant);
n = nv.n; variant = nv.variant;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't like double parked assignments.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, this would be

let [n,variant] = this.FONTDATA.RemapPlane1(n,variant);

Putting the two assignments on the same line is my way of imitating this. The purpose of those two lines is to decompose the object obtained from the previous command. It has always bothered me that JavaScript didn't have a way to do that directly, so I'm glad to see it in ES6.

var RANGES = this.FONTDATA.RANGES, VARIANT = this.FONTDATA.VARIANT;
if (n >= RANGES[0].low && n <= RANGES[RANGES.length-1].high) {
for (id = 0, M = RANGES.length; id < M; id++) {
Expand Down