I am using sharp to convert an svg
file into png
format to upload to a slack workspace.
CodePudding user response:
After browsing several Github Issues about this [Link 1, Link 2 , Link 3] , I did more research and discovered that I needed a font-config file and fonts downloaded because the Replit server did not have the fonts installed.
File Structure
- index.js
- api
- fetch.js
- fonts
- fonts.conf
- SourceSansPro-Regular.ttf
fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir>/home/runner/gittrack/fonts</dir>
<config></config>
</fontconfig>
Once I added the above changes, I am now getting fonts on my png