Closed CoolGames closed 8 years ago
You need to run a local webserver to be able to load fonts. I usually use either a python webserver
python -m SimpleHTTPServer 9000
or the (faster!) node.js server
http-server -p 9000
then access the page at localhost:9000.
Does this fix your font loading issue?
I am running full Apache2
That's what we're using in production, a bog-standard Apache install. On Apr 28, 2016 9:59 AM, "Lee T. Davy" notifications@github.com wrote:
I am running full Apache2
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/EinsteinsWorkshop/BlocksCAD/issues/29#issuecomment-215432269
I am using both Ubuntu Studio and Beagle Bone Black with machinekit (LinuxCNC / EMC2) and neither is able to find the fonts in the subdirectory on BlocksCAD/fonts Is there packages required for truetype on Linux ?
Also uploaded to my GoDaddy domain in subdirectory using git clone and it also has the error
I'll try to check this against a fresh Ubuntu image tonight to figure out what dependencies are actually required. If memory serves, we're hosting on Ubuntu, but it could be centos. On Apr 28, 2016 10:16 AM, "Lee T. Davy" notifications@github.com wrote:
Also uploaded to my GoDaddy domain in subdirectory using git clone and it also has the error
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/EinsteinsWorkshop/BlocksCAD/issues/29#issuecomment-215438105
silly things to check:
Not sure how to run node.js webserver separately ? Fonts can be found in filesystem in BlocksCAD subdirectory and only ones offered !
Here is what I save from on line to localhost to get the error
//!OpenSCAD
translate([-50, 0, 10]){ color([0.2,0.8,1]) { linear_extrude( height=2, twist=0, center=false){ text("Cool Games", font = "Roboto", size = 20); }
} }
Save as OpenSCAD (can't attach)
Compiling design (CSG Tree generation)... Compiling design (CSG Products generation)... Geometries in cache: 2 Geometry cache size in bytes: 181272 CGAL Polyhedrons in cache: 0 CGAL cache size in bytes: 0 Compiling design (CSG Products normalization)... Normalized CSG tree has 1 elements Compile and preview finished. Total rendering time: 0 hours, 0 minutes, 0 seconds
if you have node.js installed, try this:
navigate to the top level directory of blockscad (it should contain index.html) http-server -p 9000
if you don't have node.js, but you have python, from that same directory you can instead run python -m SimpleHTTPServer 9000
then from your web browser, access BlocksCAD from http://localhost:9000
Python worked so what is difference from apache running the code ? Is there a need to reconfigure on localhost and GoDaddy ?
No idea. Hopefully Matt will have some ideas. If you manage to fix it, let me know what needed to happen so I can help others in the future.
I have nodejs 4.2.6 installed including dependencies with synaptic
leetdavy@leetdavy-StudioAir:/var/www/html/BlocksCAD$ dpkg -l | grep node
ii nodejs 4.2.6~dfsg-1ubuntu4 amd64 evented I/O for V8 javascript
leetdavy@leetdavy-StudioAir:/var/www/html/BlocksCAD$
Closing this because I think it was not a BlocksCAD issue.
"Error: Failed to Load Font:" when using TEXT on Ubuntu Studio localhost. next issue is error blocscad.js needs to be set offline true as revealed by phone call to developer Blockscad.offline = true; // true unless using a cloud service backend for file management