@reogrid/font-tc
v1.0.1
Published
Noto Sans TC subset for ReoGrid PDF export (zh-TW).
Maintainers
Readme
@reogrid/font-tc
A subset of Noto Sans TC packaged for ReoGrid PDF export, so a browser never has to fetch a 11.39 MB font from a CDN.
npm install @reogrid/font-tcimport { registerPdfFont, preloadPdfFont } from '@reogrid/pro';
import { loadNotoSansTC } from '@reogrid/font-tc';
registerPdfFont('zh-TW', loadNotoSansTC); // wire it up
await preloadPdfFont('zh-TW'); // once, at app start
grid.saveAsPdf({ locale: 'zh-TW', filename: 'report.pdf' });Requires
@reogrid/pro1.5.0 or newer —registerPdfFontand thelocaleoption landed in 1.5.0.
The bytes sit behind a dynamic import, so bundlers keep them in their own chunk: an app that never exports a PDF never downloads them.
What is in it
| | |
|---|---|
| Upstream | notosanstc @ 7ff85c87f9 |
| Characters | 13,682 (BIG5 repertoire + ASCII) |
| Upstream size | 11.39 MB |
| Subset | 7993 KB |
| Over the wire | ~4840 KB (base64, brotli) |
Characters outside that repertoire fall back to .notdef — pass your own font
bytes to registerPdfFont if you need wider coverage.
Licence
Noto Sans TC is licensed under the SIL Open Font License 1.1, which is included in this package and applies to the subset as well. The build scripts are MIT.
