<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Access to the (fake) FileSystem in WEB Applications]]></title><description><![CDATA[<p dir="auto">Here's something for those wanting 'more' from JSCAD designs.</p>
<p dir="auto">The 'fs' (File System) module is available to designs, both NODE.js and WEB versions.</p>
<pre><code>const fs = require('fs')
</code></pre>
<p dir="auto">The WEB versions is not 100% compatible, but it can provide access to other data. For example, fonts can be added to the contents of a JSCAD project. And the font can be read via the 'fs' module.</p>
<pre><code>const data = fs.readFileSync('project_text/Osaka.ttf')
</code></pre>
<p dir="auto">And used with the jscad-text project, outlines of characters can be created very easily.</p>
<pre><code>const {primitives} = require('@jscad/modeling')

const { loadFontFromData, textToPaths } = require('./jscad-text')

const fs = require('fs')

const main = (params) =&gt; {
  const data = fs.readFileSync('project_text/Osaka.ttf')

  const font = loadFontFromData(data)

  const paths = textToPaths({font, segments: 144}, 'JSCAD!　大好きです!')

  return paths
}

module.exports = { main }
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1603686501895-5.png" alt="5.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://openjscad.nodebb.com/topic/188/access-to-the-fake-filesystem-in-web-applications</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 03:27:36 GMT</lastBuildDate><atom:link href="https://openjscad.nodebb.com/topic/188.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Oct 2020 04:39:16 GMT</pubDate><ttl>60</ttl></channel></rss>