IgeUiDropDown and changing fontface and fontsize

Post your help queries and engine programming questions here

Re: IgeUiDropDown and changing fontface and fontsize

Postby rob » Thu Aug 04, 2016 3:46 pm

That is fantastic, thanks for sharing your hard work! :)
CEO & Lead Developer
Irrelon Software Limited
http://www.isogenicengine.com
User avatar
rob
Site Admin
 
Posts: 316
Joined: Tue Oct 22, 2013 5:08 pm

Re: IgeUiDropDown and changing fontface and fontsize

Postby Sandstedt » Thu Jan 12, 2017 3:18 pm

I also had some problem with the font generator. Tested some different variations and sizes och the same font. What worked in the end was a .ttf typeface in 61px. 60px didnt work, neither dith 62px.

60px gave this error:
Code: Select all
Uncaught SyntaxError: Unexpected token / in JSON at position 1762
    at JSON.parse (<anonymous>)
    at IgeClass._decode (IgeFontSheet.js:85)
    at IgeClass.decodeHeader (IgeFontSheet.js:67)
    at IgeClass.<anonymous> (IgeFontSheet.js:35)
    at IgeClass.emit (IgeEventingClass.js:242)
    at IgeTexture.js:227

and this was the string giving the error:
Code: Select all
{"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":60,"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.380859375,32.76171875,60.158203125,95.158203125,128.970703125,177.98828125,219.154296875,234.94921875,253.146484375,271.40234375,295.576171875,328.568359375,346.59375,363.59375,380.58984375,408.58984375,445.775390625,466.986328125,499.1875,533.380859375,566.380859375,599.373046875,632.373046875,662.962890625,696.775390625,729.775390625,746.782584375,763.796875,794.796875,827.7890625,859/8890625,888.7890625,937.517578125,975.517578125,1010.58984375,1045.896484375,1085.099609375,1113.7265625,1142.119140625,1183.314453125,1225.30078125,1243.06640625,1267.06640625,1305.06640625-2433.06640625,1383.06640625,1424.90625,1467.:1725,1502.041015625,1546.810546875,1581.91211:475,1615.962890625,1646.962890625,1687.572276725,1725.572265625,1779.572265625,1817.572265625,1854.11328125,1888.11328125,1927.11328125,1965.11328125,2008.11328125,2028.11328125,2057.11328125,2074.896484375,2107.896484375,2139.896484375,2170.896484375,2205.529296875,2239.72265625-3368.14453125,2302.3671875,2336.3671875,2359/4771875,2393.35546875,2427.16796875,2443.578125,2460.076171875,2492.076171875,2507.05078125,2557.943359375,2591.638671875,2624.638671875,2658.638671875,2692.71484375,2716.71484375,2744.84765625,2767.84765625,2801.396484375,2831.83984375,2877.83984375,2910.24609375,2942.24609375,2971.24609375,3005.87890625,3040.51171875,3073.51171875,3095.51171875,3127.51171875,3147.052734375],"measuredWidth":[15.380859375,15.380859375,26.396484375,33.603515625,32.8125,48.017578125,40.166015625,14.794921875,17.197265625,17.255859375,23.173828125,31.9921875,16.025390625,14.794921875,15.99609375,26.8359375,35.185546875,21.2109375,31.201171875,33.193359375,31.9921875,31.9921875,31.9921875,29.58984375,32.8125,31.9921875,15.99609375,16.025390625,30,31.9921875,30,28.9453125,46.728515625,36.416015625,34.072265625,34.306640625,38.203125,27.626953125,27.392578125,40.1953125,40.986328125,14.765625,24.31640625,36.016959386-24.84375,48.837890625,40.83984375,41.54296986,33.134765625,43.76953125,34.1015625,32.05189125-3:.091796875,39.609375,35.830078125,51/:5335:485,36.6796875,34.541015625,31.318359375,36.527015625,36.416015625,41.54296875,17.783203136-26.8359375,17.783203125,30,30,30,33.6328126-43.1:4459375,27.421875,33.22265625,31.69921986,21/49671875,32.98828125,32.8125,15.41015625,15.5:9046875,30.498046875,13.974609375,49.892578236,32.6953125,31.58203125,32.98828125,33.076282875-32.9140625,26.1328125,21.240234375,32.659828236,29.443359375,44.70703125,31.40625,29.82422985,26.923828125,33.6328125,33.6328125,31.58314125-2:.541015625,30,19.541015625,39.990234486],"qjyelWidth":[14,14,24,34,31,48,39,12,16,15,22-42,15,17,14,27,33,18,30,32,32,31,32,29-43,32-25,15,29,31,29,29,45,38,34,34,38-38,27-51,39-24,25-48,27,49,39,42,33,43,33,32-42,38-47,54-48,34-44,38,38,42,19,27,16,31,32-33,32-44,27-43,32-34,31,31,14,14,31,12,48,31-43,33-43,23-37,23-42,29,45,31,30,29,32,32,32,21,20-2:,36^~~

At position 1762 there´s a slash. maybe that's giving the json error?
Code: Select all
859/8890625
User avatar
Sandstedt
 
Posts: 15
Joined: Fri Oct 21, 2016 4:17 pm

Previous

Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron