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
I was using your code exactly but a font called norwester. I then went and tried your font and found that its a negative space font. So it was working as expected by creating the gcode from the fill area. I was using the gcanvas example to create the same effect by putting a rectangle behind.
roundRect(ctx, 0,0,180,60,5);
ctx.fill('evenodd');
function roundRect(ctx, x, y, w, h, r) {
if (w < 2 * r) r = w / 2;
if (h < 2 * r) r = h / 2;
ctx.moveTo(x+r, y);
ctx.arcTo(x+w, y, x+w, y+h, r);
ctx.arcTo(x+w, y+h, x, y+h, r);
ctx.arcTo(x, y+h, x, y, r);
ctx.arcTo(x, y, x+w, y, r);
ctx.closePath();
}
I can't seem to recreate it with your code any ideas.
I ran into an opentype.js error on 0.3.x and 0.8.x:
text2gcode (master)‣ node text2gcode.js --font=/Users/tmpvar/Downloads/norwester/norwester.otf --diameter=6.35 --depth=-10 --pass=1
/Users/tmpvar/work/js/text2gcode/node_modules/opentype.js/dist/opentype.js:331
for (i = 0; i < s.length; i += 1) {
^
TypeError: Cannot read property 'length' of undefined
at Font.stringToGlyphs (/Users/tmpvar/work/js/text2gcode/node_modules/opentype.js/dist/opentype.js:331:22)
at Font.forEachGlyph (/Users/tmpvar/work/js/text2gcode/node_modules/opentype.js/dist/opentype.js:384:19)
at Font.getPath (/Users/tmpvar/work/js/text2gcode/node_modules/opentype.js/dist/opentype.js:410:10)
at /Users/tmpvar/work/js/text2gcode/text2gcode.js:62:19
at /Users/tmpvar/work/js/text2gcode/node_modules/opentype.js/dist/opentype.js:950:16
at /Users/tmpvar/work/js/text2gcode/node_modules/opentype.js/dist/opentype.js:797:9
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:504:3)
Ya i don't get any errors, i'm running newest version of opentype. That is the font i was using also. And it works as expected. I had to put in a feed to preview in the visualization but thats it.
I can't only get inset code still playing around with it. any ideas
Activity
tmpvar commentedon Mar 9, 2018
not off the top of my head, could you provide the font + command that you are running?
rlarge commentedon Mar 10, 2018
I was using your code exactly but a font called norwester. I then went and tried your font and found that its a negative space font. So it was working as expected by creating the gcode from the fill area. I was using the gcanvas example to create the same effect by putting a rectangle behind.
I can't seem to recreate it with your code any ideas.
tmpvar commentedon Mar 10, 2018
very interesting - I tried to repro what you are doing and downloaded https://www.fontsquirrel.com/fonts/norwester - is that the font you are using?
I ran into an opentype.js error on 0.3.x and 0.8.x:
rlarge commentedon Mar 10, 2018
Ya i don't get any errors, i'm running newest version of opentype. That is the font i was using also. And it works as expected. I had to put in a feed to preview in the visualization but thats it.
I can't only get inset code still playing around with it. any ideas