pdfmake-with-chinese-fonts

pdfmake with Chinese Noto Serif TC font

Usage no npm install needed!

<script type="module">
  import pdfmakeWithChineseFonts from 'https://cdn.skypack.dev/pdfmake-with-chinese-fonts';
</script>

README

pdfmake build : 0.1.55

1.0.2 : 微软雅黑 1.0.4 : 宋体 1.0.12 : Noto_Serif_TC

===build=== copy fonts from c:/windows/fonts to pdfmake/examples/fonts gulp buildFonts

npm login (bytesun) npm publish --access public ===usage=== import pdfMake from "pdfmake-with-chinese-fonts/pdfmake"; import pdfFonts from "pdfmake-with-chinese-fonts/vfs_fonts";

pdfMake.vfs = pdfFonts.pdfMake.vfs;

pdfMake.fonts = { Roboto: { normal: 'Roboto-Regular.ttf', bold: 'Roboto-Medium.ttf', italics: 'Roboto-Italic.ttf', bolditalics: 'Roboto-MediumItalic.ttf' },

msyh: { normal: 'msyh.ttf', bold: 'msyh.ttf', italics: 'msyh.ttf', bolditalics: 'msyh.ttf',

 }

};

defaultStyle: {font: 'msyh' },