privateOmega / html-to-docx

HTML to DOCX converter
MIT License
373 stars 140 forks source link

Lang / time new roman font is not working #214

Open andreeapurta opened 12 months ago

andreeapurta commented 12 months ago

Hello! My app is in next.js (React) My text is in romanian and contains: "âțășî" characters. Times New Roman supports these characters. When I download the document all the characters are displayed in Times New Roman, but "ățâșî" are in Calibri image

Here is my documentOptions:

  const documentOptions={
        pageNumber: true,
        footer: true,
        lang:"ro"
    }

I also tried with css:

 <h1 style={titleStyle}>{doc.title}</h1>
 const titleStyle = {
        fontSize: "14pt",
        textAlign: "center",
        fontFamily: "Times New Roman",
        fontWeight: "bold"
    };

But nothing seems to work. I would like to have all in Times New Roman. Am I missing anything?