@reogrid/font-sc
v1.0.1
Published
Noto Sans SC subset for ReoGrid PDF export (zh-CN).
Maintainers
Readme
@reogrid/font-sc
A subset of Noto Sans SC packaged for ReoGrid PDF export, so a browser never has to fetch a 16.95 MB font from a CDN.
npm install @reogrid/font-scimport { registerPdfFont, preloadPdfFont } from '@reogrid/pro';
import { loadNotoSansSC } from '@reogrid/font-sc';
registerPdfFont('zh-CN', loadNotoSansSC); // wire it up
await preloadPdfFont('zh-CN'); // once, at app start
grid.saveAsPdf({ locale: 'zh-CN', 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 | notosanssc @ 7ff85c87f9 |
| Characters | 7,709 (GB2312 repertoire + ASCII) |
| Upstream size | 16.95 MB |
| Subset | 4006 KB |
| Over the wire | ~2593 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 SC 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.
