@embedpdf/fonts-sc
为EmbedPDF简化中文(GB2312)倒置字体.
包含字体
5重"野多·桑斯·汉斯" (简体中文)
NotoSansHans-Light.otf- 轻重量(300)NotoSansHans-DemiLight.otf- 重量(350)NotoSansHans-Regular.otf- 正常重量(400)NotoSansHans-Medium.otf- 中重量(500)NotoSansHans-Bold.otf- 粗体重量(700美元)
注:不包含薄和黑重量,以保持包件的尺寸限制.
使用量
import { FontCharset } from '@embedpdf/models';
const fontFallback = {
fonts: {
[FontCharset.GB2312]: [
{ url: 'NotoSansHans-Light.otf', weight: 300 },
{ url: 'NotoSansHans-DemiLight.otf', weight: 350 },
{ url: 'NotoSansHans-Regular.otf', weight: 400 },
{ url: 'NotoSansHans-Medium.otf', weight: 500 },
{ url: 'NotoSansHans-Bold.otf', weight: 700 },
],
},
baseUrl: 'https://cdn.jsdelivr.net/npm/@embedpdf/fonts-sc@1/fonts',
};
或使用预配置的 CDN 配置 :
import { cdnFontConfig } from '@embedpdf/engines/pdfium';
const native = new PdfiumNative(pdfiumModule, {
fontFallback: cdnFontConfig,
});
许可证
这些字体根据 SIL 开放字体许可证 1.1。 。 。 .
诺托·桑斯·汉斯是Google LLC的商标.