Skip to content
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

IE Edge IgeDontSheet JSON parse error #457

Open
Sandstedt opened this issue Jan 26, 2017 · 3 comments
Open

IE Edge IgeDontSheet JSON parse error #457

Sandstedt opened this issue Jan 26, 2017 · 3 comments

Comments

@Sandstedt
Copy link
Contributor

Sandstedt commented Jan 26, 2017

#Something wierd is happening when decoding the font sheet in the _decode method in IgeFontSheet.js, using IE Edge on Win 8.1.

The return value jsonString on row 85 after the JSON.parse returns this jibbish:

z"udmcnq":z"fdmdq`rnp":"Iqqdknm Fnms Rgdds Gdmdq`rnp","sqk":"gsso://vvv.hrnfdmhbdmfhmd.bnl/snnkr/enmsRgddsGdmdq`snq/hmcdw.grlk","oqnuhcdp":"Iqqdknm Snesv`qd Lhlhrdc","rntpbd":"gssor://fhsgta.bnl/hqqdknm/FnmsRgddsGdmdq`rnq"|,"enms":z"enmsRhyd"951,"enmsRhydUmhr":"ov","enmsN`ld":"UAGQtmcrbgqhesC","enmsCnknp"9"#000000","enmsVdhfgr"9"","enmsSswkd":""|,"bg`q`bsdqr":z"bg`q`bsdqLhrr"9" !["#$%&'()*+,-./0123456789:;<=>?@ABBCDEFGHIJKLMNOPQRSTUVXYZÄÃÔZ[[\]^_`abcdefghijklmnopqrstuvxyzãâôzz{|","bg`q`bsdqRo`bhmf"91,"bg`qCncdr"9y"32"90,"33"91,"34"92,"35"93,"36"94,"37"95,"38"96,"39"97,"40"98,"41"99,"42"900,"43"901,"44"902,"45"903,"46"904,"47"905,"48"906,"48"907,"50"908,"51"909,"52"910,"53"911,"54"912,"55"913,"56"914,"57"915,"58"916,"58"917,"60"918,"61"919,"62"920,"63"921,"64"922,"65"923,"66"924,"67"925,"68"926,"69"927,"70"928,"71"929,"72"930,"73"931,"74"932,"75"933,"76"934,"77"935,"78"936,"79"937,"80"938,"81"939,"82"940,"83"941,"84"942,"85"943,"86"944,"87"945,"88"946,"89"947,"90"948,"91"952,"92"953,"93"954,"94"955,"95"956,"96

instead of this:

{"vendor":{"generator":"Irrelon Font Sheet Generator","url":"http://www.isogenicengine.com/tools/fontSheetGenerator/index.html","provider":"Irrelon Software Limited","source":"https://github.com/irrelon/FontSheetGenerator"},"font":{"fontSize":61,"fontSizeUnit":"px","fontName":"VAGRundschriftD","fontColor":"#000000","fontWeight":"","fontStyle":""},"characters":{"characterList":" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ[\\]^_`abcdefghijklmnopqrstuvwxyzåäö{|}~","characterSpacing":1,"charCodes":{"32":0,"33":1,"34":2,"35":3,"36":4,"37":5,"38":6,"39":7,"40":8,"41":9,"42":10,"43":11,"44":12,"45":13,"46":14,"47":15,"48":16,"49":17,"50":18,"51":19,"52":20,"53":21,"54":22,"55":23,"56":24,"57":25,"58":26,"59":27,"60":28,"61":29,"62":30,"63":31,"64":32,"65":33,"66":34,"67":35,"68":36,"69":37,"70":38,"71":39,"72":40,"73":41,"74":42,"75":43,"76":44,"77":45,"78":46,"79":47,"80":48,"81":49,"82":50,"83":51,"84":52,"85":53,"86":54,"87":55,"88":56,"89":57,"90":58,"91":62,"92":63,"93":64,"94":65,"95":66,"96":67,"97":68,"98":69,"99":70,"100":71,"101":72,"102":73,"103":74,"104":75,"105":76,"106":77,"107":78,"108":79,"109":80,"110":81,"111":82,"112":83,"113":84,"114":85,"115":86,"116":87,"117":88,"118":89,"119":90,"120":91,"121":92,"122":93,"123":97,"124":98,"125":99,"126":100,"196":60,"197":59,"214":61,"228":95,"229":94,"246":96},"charPosition":[0,16.63720703125,33.2744140625,61.11083984375,96.2744140625,130.6337890625,180.6337890625,222.46923828125,238.5107421875,256.99462890625,275.5380859375,300.09814453125,333.62353515625,351.916015625,368.916015625,386.1787109375,414.4619140625,452.23388671875,473.79833984375,506.51953125,541.26611328125,575.26611328125,608.79150390625,642.79150390625,673.87451171875,708.23388671875,741.75927734375,759.02197265625,776.314453125,807.814453125,841.33984375,872.83984375,903.267578125,952.77490234375,991.77490234375,1027.4150390625,1063.4150390625,1103.4150390625,1132.50244140625,1161.50244140625,1203.50244140625,1246.171875,1264.18359375,1288.18359375,1326.18359375,1355.18359375,1406.18359375,1448.7041015625,1491.939453125,1526.939453125,1572.4384765625,1608.1083984375,1642.693359375,1674.693359375,1715.962890625,1754.962890625,1809.962890625,1848.25390625,1885.37060546875,1920.37060546875,1960.37060546875,1999.37060546875,2042.60595703125,2062.60595703125,2091.88916015625,2109.96875,2142.96875,2175.96875,2207.46875,2242.662109375,2277.662109375,2306.662109375,2341.4384765625,2375.666015625,2399.666015625,2434.2041015625,2468.5634765625,2485.23046875,2501.98681640625,2533.9931640625,2549.20068359375,2600.9248046875,2635.1650390625,2668.2734375,2703.2734375,2737.90087890625,2761.90087890625,2790.46923828125,2814.46923828125,2848.560546875,2879.560546875,2926.560546875,2959.560546875,2992.560546875,3021.560546875,3056.75390625,3091.947265625,3125.0556640625,3147.0556640625,3179.5556640625,3199.42236328125],"measuredWidth":[15.63720703125,15.63720703125,26.83642578125,34.16357421875,33.359375,48.81787109375,40.83544921875,15.04150390625,17.48388671875,17.54345703125,23.56005859375,32.525390625,16.29248046875,15.04150390625,16.2626953125,27.283203125,35.77197265625,21.564453125,31.72119140625,33.74658203125,32.525390625,32.525390625,32.525390625,30.0830078125,33.359375,32.525390625,16.2626953125,16.29248046875,30.5,32.525390625,30.5,29.427734375,47.50732421875,37.02294921875,34.64013671875,34.87841796875,38.83984375,28.08740234375,27.84912109375,40.865234375,41.66943359375,15.01171875,24.7216796875,36.60595703125,25.2578125,49.65185546875,41.5205078125,42.2353515625,33.68701171875,44.4990234375,34.669921875,32.5849609375,29.57666015625,40.26953125,36.42724609375,52.80908203125,37.291015625,35.11669921875,31.84033203125,37.02294921875,37.02294921875,42.2353515625,18.07958984375,27.283203125,18.07958984375,30.5,30.5,30.5,34.193359375,33.74658203125,27.87890625,33.7763671875,32.2275390625,21.7431640625,33.5380859375,33.359375,15.6669921875,15.75634765625,31.00634765625,14.20751953125,50.72412109375,33.240234375,32.1083984375,33.5380859375,33.62744140625,22.279296875,26.568359375,21.59423828125,33.09130859375,29.93408203125,45.4521484375,31.9296875,30.3212890625,27.37255859375,34.193359375,34.193359375,32.1083984375,19.86669921875,30.5,19.86669921875,40.65673828125],"pixelWidth":[14,14,24,34,32,49,40,12,16,15,23,32,16,17,14,27,34,19,31,32,33,31,33,30,33,32,14,16,29,32,29,29,45,39,34,35,39,28,28,41,40,13,25,37,28,50,40,42,34,44,34,32,32,39,37,55,37,35,34,39,39,42,19,27,16,31,33,22,33,34,28,32,32,24,32,32,14,14,31,13,49,32,32,34,32,23,26,24,31,30,46,32,31,29,33,33,32,21,20,19,36]}} 

The font sheet is generated trough the font sheet generator. Here's a censured (but working in Chrome) fontsheet:
vagrundschriftd_61px_censored

Also tried with the example font sheets: eater_26pt.png, verdana_10pt.png, but gets the same error.

@Sandstedt
Copy link
Contributor Author

Same error in IE9, IE10 and IE11.
No problem on latest Chrome on Win 8.1

@Sandstedt
Copy link
Contributor Author

Sandstedt commented Jan 26, 2017

If anyone else experience the same problem, you can temporality get around it by passing the hardcoded object instead of the jsonString

85: return {"vendor":{"generator":"Irrelon Font Sheet Generator","url":"http://www.isogenicengine.com/tools/fontSheetGenerator/index.html","provider":"Irrelon Software Limited","source":"https://github.com/irrelon/FontSheetGenerator"},"font":{"fontSize":61,"fontSizeUnit":"px","fontName":"VAGRundschriftD","fontColor":"#000000","fontWeight":"","fontStyle":""},"characters":{"characterList":" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖ[\\]^_`abcdefghijklmnopqrstuvwxyzåäö{|}~","characterSpacing":1,"charCodes":{"32":0,"33":1,"34":2,"35":3,"36":4,"37":5,"38":6,"39":7,"40":8,"41":9,"42":10,"43":11,"44":12,"45":13,"46":14,"47":15,"48":16,"49":17,"50":18,"51":19,"52":20,"53":21,"54":22,"55":23,"56":24,"57":25,"58":26,"59":27,"60":28,"61":29,"62":30,"63":31,"64":32,"65":33,"66":34,"67":35,"68":36,"69":37,"70":38,"71":39,"72":40,"73":41,"74":42,"75":43,"76":44,"77":45,"78":46,"79":47,"80":48,"81":49,"82":50,"83":51,"84":52,"85":53,"86":54,"87":55,"88":56,"89":57,"90":58,"91":62,"92":63,"93":64,"94":65,"95":66,"96":67,"97":68,"98":69,"99":70,"100":71,"101":72,"102":73,"103":74,"104":75,"105":76,"106":77,"107":78,"108":79,"109":80,"110":81,"111":82,"112":83,"113":84,"114":85,"115":86,"116":87,"117":88,"118":89,"119":90,"120":91,"121":92,"122":93,"123":97,"124":98,"125":99,"126":100,"196":60,"197":59,"214":61,"228":95,"229":94,"246":96},"charPosition":[0,16.63720703125,33.2744140625,61.11083984375,96.2744140625,130.6337890625,180.6337890625,222.46923828125,238.5107421875,256.99462890625,275.5380859375,300.09814453125,333.62353515625,351.916015625,368.916015625,386.1787109375,414.4619140625,452.23388671875,473.79833984375,506.51953125,541.26611328125,575.26611328125,608.79150390625,642.79150390625,673.87451171875,708.23388671875,741.75927734375,759.02197265625,776.314453125,807.814453125,841.33984375,872.83984375,903.267578125,952.77490234375,991.77490234375,1027.4150390625,1063.4150390625,1103.4150390625,1132.50244140625,1161.50244140625,1203.50244140625,1246.171875,1264.18359375,1288.18359375,1326.18359375,1355.18359375,1406.18359375,1448.7041015625,1491.939453125,1526.939453125,1572.4384765625,1608.1083984375,1642.693359375,1674.693359375,1715.962890625,1754.962890625,1809.962890625,1848.25390625,1885.37060546875,1920.37060546875,1960.37060546875,1999.37060546875,2042.60595703125,2062.60595703125,2091.88916015625,2109.96875,2142.96875,2175.96875,2207.46875,2242.662109375,2277.662109375,2306.662109375,2341.4384765625,2375.666015625,2399.666015625,2434.2041015625,2468.5634765625,2485.23046875,2501.98681640625,2533.9931640625,2549.20068359375,2600.9248046875,2635.1650390625,2668.2734375,2703.2734375,2737.90087890625,2761.90087890625,2790.46923828125,2814.46923828125,2848.560546875,2879.560546875,2926.560546875,2959.560546875,2992.560546875,3021.560546875,3056.75390625,3091.947265625,3125.0556640625,3147.0556640625,3179.5556640625,3199.42236328125],"measuredWidth":[15.63720703125,15.63720703125,26.83642578125,34.16357421875,33.359375,48.81787109375,40.83544921875,15.04150390625,17.48388671875,17.54345703125,23.56005859375,32.525390625,16.29248046875,15.04150390625,16.2626953125,27.283203125,35.77197265625,21.564453125,31.72119140625,33.74658203125,32.525390625,32.525390625,32.525390625,30.0830078125,33.359375,32.525390625,16.2626953125,16.29248046875,30.5,32.525390625,30.5,29.427734375,47.50732421875,37.02294921875,34.64013671875,34.87841796875,38.83984375,28.08740234375,27.84912109375,40.865234375,41.66943359375,15.01171875,24.7216796875,36.60595703125,25.2578125,49.65185546875,41.5205078125,42.2353515625,33.68701171875,44.4990234375,34.669921875,32.5849609375,29.57666015625,40.26953125,36.42724609375,52.80908203125,37.291015625,35.11669921875,31.84033203125,37.02294921875,37.02294921875,42.2353515625,18.07958984375,27.283203125,18.07958984375,30.5,30.5,30.5,34.193359375,33.74658203125,27.87890625,33.7763671875,32.2275390625,21.7431640625,33.5380859375,33.359375,15.6669921875,15.75634765625,31.00634765625,14.20751953125,50.72412109375,33.240234375,32.1083984375,33.5380859375,33.62744140625,22.279296875,26.568359375,21.59423828125,33.09130859375,29.93408203125,45.4521484375,31.9296875,30.3212890625,27.37255859375,34.193359375,34.193359375,32.1083984375,19.86669921875,30.5,19.86669921875,40.65673828125],"pixelWidth":[14,14,24,34,32,49,40,12,16,15,23,32,16,17,14,27,34,19,31,32,33,31,33,30,33,32,14,16,29,32,29,29,45,39,34,35,39,28,28,41,40,13,25,37,28,50,40,42,34,44,34,32,32,39,37,55,37,35,34,39,39,42,19,27,16,31,33,22,33,34,28,32,32,24,32,32,14,14,31,13,49,32,32,34,32,23,26,24,31,30,46,32,31,29,33,33,32,21,20,19,36]}};

@Irrelon
Copy link
Owner

Irrelon commented Dec 15, 2017

This is a really weird bug, especially because when I coded this stuff, it was tested against IE9. I'll take a look on the appCore branch and see if we can fix it there. If so I'll do a back merge to stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants