Skip to content

Greek custom fonts, not supported in new version. #2174

@zeligmanos

Description

@zeligmanos

I'm using the latest version of jsPDF and have managed to successfully implement custom fonts for almost any language (Cyrillic, Japanese etc)! But no matter what I have tried, Greek fonts are never correctly reproduced to .pdf. I encode them to Base64 using your converter and use this code:

var doc = new jsPDF();
doc.addFileToVFS("Arialbd.ttf", font);
doc.addFont("Arialbd.ttf", "arialbd", "bold");
doc.setFont('arialbd');
doc.text(50,50,'Καλημέρα');```

But instead of 'Καλημέρα' I see some bizarre characters being produced. And this happens with all the Greek fonts I have tried. Any idea why this happens with Greek characters? Is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions