
After the release of version 1.4.0, the jsPDF finally supports encoding diacritics characters, but in a very strange way, in my opinion.
C:\Windows\Fonts\Calibri and copy a .ttf font file to Desktop.import { jsPDF } from "jspdf"
var font = 'AAEAAAAWAQQAAB...==';
var callAddFont = function () {
this.addFileToVFS('calibri-normal.ttf', font);
this.addFont('calibri-normal.ttf', 'calibri', 'normal');
};
jsPDF.API.events.push(['addFonts', callAddFont]);The second string in this.addFont('calibri-normal.ttf', 'calibri', 'normal'); will be the name of your font. Remember it.
import '../utils/calibri-normal';jsPDF object and set your font up:<span class="hljs-keyword">const</span> doc = <span class="hljs-keyword">new</span> <span class="hljs-title function_">jsPDF</span>(<span class="hljs-string">'p'</span>, <span class="hljs-string">'pt'</span>, <span class="hljs-string">'a4'</span>); doc.<span class="hljs-title function_">setFont</span>(<span class="hljs-string">"calibri"</span>); <span class="hljs-comment">// <-- place here your font name, which you remeber before</span> <span class="hljs-comment">//...</span> doc.<span class="hljs-title function_">save</span>(<span class="hljs-string">'file001.pdf'</span>);
doc.<span class="hljs-title function_">autoTable</span>({
<span class="hljs-attr">head</span>: [[<span class="hljs-string">'Column1'</span>, <span class="hljs-string">'Column2'</span>, <span class="hljs-string">'Column3'</span>]],
<span class="hljs-attr">body</span>: someDataRows,
<span class="hljs-attr">styles</span>: {
<span class="hljs-attr">font</span>: <span class="hljs-string">'calibri'</span>, <span class="hljs-comment">// <-- place name of your font here</span>
<span class="hljs-attr">fontStyle</span>: <span class="hljs-string">'normal'</span>,
},
<span class="hljs-attr">margin</span>: { <span class="hljs-attr">bottom</span>: <span class="hljs-number">60</span> }
});Google Chrome has dominated web browsing for over a decade with 71.77% global market share.…
Perplexity just made its AI-powered browser, Comet, completely free for everyone on October 2, 2025.…
You've probably heard about ChatGPT Atlas, OpenAI's new AI-powered browser that launched on October 21,…
Perplexity Comet became free for everyone on October 2, 2025, bringing research-focused AI browsing to…
ChatGPT Atlas launched on October 21, 2025, but it's only available on macOS. If you're…
Two AI browsers just entered the ring in October 2025, and they're both fighting for…