I'm using jsPDF and trying to import a custom font in my react single-page-app using create-react-app. I followed the steps here to create a js file with my font using the jspdf font converter. I am importing my js file containing my font using the steps in Tunc's answer to this related question, but I'm still getting the following error message, "jsPDF PubSub Error No unicode cmap for font Error: No unicode cmap for font". The font file I'm using for the converter is the desktop font (tff format) from here: https://www.cufonfonts.com/font/wingdings
Here is my js file with my font:
import jsPDF from "jspdf"; //added to get rid of error message "jsPDF not defined" for my react SPA
(function(jsPDFAPI) {
var font = [I clipped the giant font text for this post];
var callAddFont = function() {
this.addFileToVFS("wingdings-normal.ttf", font);
this.addFont("wingdings-normal.ttf", "wingdings", "normal");
};
jsPDFAPI.events.push(["addFonts", callAddFont]);
})(jsPDF.API);
When I import the js font file in my react component import "../wingdings-normal";
I get the "No unicode cmap for font" error message. Is the font cmap removed in the converter?