I have a node/React set up like
client
React app here
fonts
node_modules
index.js
package-lock.json
package.json
In my index.js I'm using the npm package fontkit to get info about a font installed in the fonts folder
const fontkit = require('fontkit');
const font = fontkit.openSync('./fonts/OpenSans-Bold.ttf');
const fontFeatures = font.availableFeatures
console.log(fontFeatures)
This returns the a list of the Opentype features like:
[ 'lnum',
'onum',
'pnum',
'liga',
'salt',
'ss01',
'ss02',
'ss03',
'tnum',
'kern' ]
I'd like to be able to use this array in the React app
How can I access the array created in node from the React app