// const express = require('express')
// const TextToSVG = require('text-to-svg')
// const fs = require('fs')
// const textToSVG = TextToSVG.loadSync('./static/Dubai-Bold.otf')
// const app = express()
// const lineLengthviewer = (oneLineText) => { //to view the length of each line by pixel
// let {width} = textToSVG.getMetrics(oneLineText, options = {fontSize: 14})
// console.log('This line width is: ', width)
// }
// let svgFormat = ''
// svgFormat = svgFormat.replaceAll('"/> { //to view the length of each line by pixel
let {width} = textToSVG.getMetrics(oneLineText, options = {fontSize: fontSize})
console.log('This line width is: ', width)
}
app.use(express.json())
app.post('/textToSVG', (req, res) => {
console.log(req);
console.log(req.body);
const text = req.body.text
const screenSize = req.body.screenSize
const userFontSize = req.body.fontSize
let svgFormat = ''
svgFormat = svgFormat.replaceAll('"/> {
console.log('App is listening on port ', port);
});