You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to get the example/article to display correctly (none of the five "canvas" samples show up), I needed to make a couple of corrections in the align() function of index.html:
In recently added line devicePixelRatio = window.devicePixelRatio || 1; the semicolon must be changed to a comma: devicePixelRatio = window.devicePixelRatio || 1, or else bad things happen. This is clearly a coding error, as the next line format, nodes, breaks; is clearly meant to be the end of the var statement.
A few lines later, I had to comment out the entire line canvas.scale(devicePixelRatio, devicePixelRatio);. If I don't, there's no sign that it ever gets past this statement (window.alert("I just did the scale"); doesn't show up). devicePixelRatio has a value of "1", so it shouldn't be making any difference. I'm not sure what's going wrong here, but since the scale factor is 1 anyway, no harm done.
This was tried on the current Firefox browser. It works great with the two changes (all five canvas samples now show up). Does it display OK (without change) on other browsers? Incidentally, the same "article" works OK on the frobnitzem/typeset fork.
Add: Is there anything I can do or set in Javascript to flag the errors I reported above? It just silently glided past these errors without saying a word (just not working as expected). I find that most unsatisfactory. Flagging undeclared variables, flagging syntax errors, and reporting runtime errors is the bare minimum for any decent language!
The text was updated successfully, but these errors were encountered:
A further problem: the "assisted browser line breaks" example has a lot of problems with gaps within words, such as "bal l". It's not hyphenation points; I can't tell what it is -- do others see this issue? Firefox browser on Windows 10.
I thought there was a problem with split words in the canvas examples missing their hyphen, but it turned out I had changed the penalty from 100 to 3000 for this (see #27 and #22), and needed to update a line of code checking if a hyphen needed to be inserted.
At least in Firefox, there are a few flavors of browser console around. These will flag various errors, but it's still bad that in normal operation the browser goes silently by even severe errors. Anyway, the Perl version (Text::KnuthPlass) is coming along nicely, and will eventually include both "Flatland" and "Article" examples.
Add: Flatland is included in the new Text::KnuthPlass 1.07 release, while Article needs to wait until some enhancements are made to PDF::Builder to embed italic, bold, etc. in text.
In order to get the example/article to display correctly (none of the five "canvas" samples show up), I needed to make a couple of corrections in the align() function of index.html:
devicePixelRatio = window.devicePixelRatio || 1;
the semicolon must be changed to a comma:devicePixelRatio = window.devicePixelRatio || 1,
or else bad things happen. This is clearly a coding error, as the next lineformat, nodes, breaks;
is clearly meant to be the end of the var statement.canvas.scale(devicePixelRatio, devicePixelRatio);
. If I don't, there's no sign that it ever gets past this statement (window.alert("I just did the scale");
doesn't show up).devicePixelRatio
has a value of "1", so it shouldn't be making any difference. I'm not sure what's going wrong here, but since the scale factor is 1 anyway, no harm done.This was tried on the current Firefox browser. It works great with the two changes (all five canvas samples now show up). Does it display OK (without change) on other browsers? Incidentally, the same "article" works OK on the frobnitzem/typeset fork.
Add: Is there anything I can do or set in Javascript to flag the errors I reported above? It just silently glided past these errors without saying a word (just not working as expected). I find that most unsatisfactory. Flagging undeclared variables, flagging syntax errors, and reporting runtime errors is the bare minimum for any decent language!
The text was updated successfully, but these errors were encountered: