Error when used with Autotable.
<script>
var doc = new jsPDF();
doc.addFont('HMKMMAG.TTF', 'MagicR', 'normal', 'Identity-H');
doc.addFont('HMKMRHD.TTF', 'HeadlineR', 'normal', 'Identity-H');
doc.addFont('msgothic.ttf', 'MsGothic', 'normal', 'Identity-H');
doc.addFont('gothic.ttf', 'LiLing', 'normal', 'Identity-H');
//doc.addFont('HARLOWSI.TTF', 'WMLWQI+HarlowSolid', 'normal', 'WinAnsiEncoding');
//doc.addFont('ITCBLKAD.TTF','a','normal','WinAnsiEncoding');
//doc.addFont('BOD_PSTC.TTF','b','normal','WinAnsiEncoding');
//doc.addFont('GADUGI.TTF', 'GADUGI', 'normal', 'WinAnsiEncoding');
doc.setFont('MagicR'); // set font
doc.setFontSize(20);
doc.setTextColor(153,051,102);
doc.setCharSpace(3);
//doc.setDefaultFonts(0, 'Times'); //English default
//doc.setDefaultFonts(1, 'MagicR'); //Korean default
doc.setDefaultFonts(3, 'LiLing'); //Chinese default
doc.setDefaultFonts(2, 'MsGothic'); //Japanese default
var columns = ["ID", "Name", "Country"];
var rows = [
[1, "Shaw", "홍A平길Bお동安C"],
[2, "Nelson", "Kazakhstan"],
[3, "Garcia", "Madagascar"],
];
doc.autoTable(columns, rows,{styles: {font: "MsGothic"}});
doc.save('table.pdf');
</script>