joostn / OpenJsCad

3D solid CAD using only Javascript
313 stars 127 forks source link

Feature request: Text rendering #47

Closed matthijskooijman closed 2 years ago

matthijskooijman commented 9 years ago

It would be useful to support rendering of text into a CAG. Openjscad.org has some code for this that could be used. That does use a hardcoded "font", for more flexibility opentype.js seems promising (it allows uploading a ttf or otf file and then renders a text to a path).

z3dev commented 6 years ago

@matthijskooijman There's a new pull request which has implemented a new 'text()' function, based on opentype.js. This will become part of the CSG.js library in the very near future.

https://github.com/jscad/csg.js/pull/106

How about trying this out and giving a little feedback to the author?

z3dev commented 2 years ago

Here's a small module that shows how to use TTF fonts with JSCAD V2. I think this can be closed now.

https://github.com/jscad-community/jscad-text