pdfmake: Custom Fonts not render as expected

1.7k Views Asked by At

I tried to make custom fonts in my own language, Khmer.

Expected:

selection_024

Rendered:

selection_023

I don't really know what I missed. Really appreciate for suggestion and idea.

2

There are 2 best solutions below

1
On

Did you define your custom font as the default font in the document definition, too?

    var dd = {
        content: [...],
        styles: {...},
        defaultStyle: {
            font: 'Sunshiney'
        }
    };
0
On

pdfmaker is a javascript lib, that might need to see with Khmum browser that seems to use Javascript function to render the text for Khmer characters.