@embedpdf/fonts-latin

中文文档
1.0.0发布于 2025/12/28OFL-1.1TypeScriptESM + CJS零依赖近 30 天下载 314.5万

Latin/European fallback fonts for EmbedPDF - Noto Sans (9 weights × 2 styles)

原始使用文档
文档目录4 节
  1. Included Fonts
  2. Supported Charsets
  3. Usage
  4. License

@embedpdf/fonts-latin

Latin, Cyrillic, Greek, and Vietnamese fallback fonts for EmbedPDF.

Included Fonts

All 9 weights of Noto Sans, including italic variants (18 fonts total):

WeightRegularItalic
100 (Thin)NotoSans-Thin.ttfNotoSans-ThinItalic.ttf
200 (ExtraLight)NotoSans-ExtraLight.ttfNotoSans-ExtraLightItalic.ttf
300 (Light)NotoSans-Light.ttfNotoSans-LightItalic.ttf
400 (Regular)NotoSans-Regular.ttfNotoSans-Italic.ttf
500 (Medium)NotoSans-Medium.ttfNotoSans-MediumItalic.ttf
600 (SemiBold)NotoSans-SemiBold.ttfNotoSans-SemiBoldItalic.ttf
700 (Bold)NotoSans-Bold.ttfNotoSans-BoldItalic.ttf
800 (ExtraBold)NotoSans-ExtraBold.ttfNotoSans-ExtraBoldItalic.ttf
900 (Black)NotoSans-Black.ttfNotoSans-BlackItalic.ttf

Supported Charsets

This font covers multiple charsets used by PDFium:

  • FontCharset.CYRILLIC (204) - Russian, Ukrainian, Bulgarian, etc.
  • FontCharset.GREEK (161) - Greek
  • FontCharset.VIETNAMESE (163) - Vietnamese

Usage

import { FontCharset } from '@embedpdf/models';

const latinFonts = [
  { url: 'NotoSans-Thin.ttf', weight: 100 },
  { url: 'NotoSans-ThinItalic.ttf', weight: 100, italic: true },
  { url: 'NotoSans-ExtraLight.ttf', weight: 200 },
  { url: 'NotoSans-ExtraLightItalic.ttf', weight: 200, italic: true },
  { url: 'NotoSans-Light.ttf', weight: 300 },
  { url: 'NotoSans-LightItalic.ttf', weight: 300, italic: true },
  { url: 'NotoSans-Regular.ttf', weight: 400 },
  { url: 'NotoSans-Italic.ttf', weight: 400, italic: true },
  { url: 'NotoSans-Medium.ttf', weight: 500 },
  { url: 'NotoSans-MediumItalic.ttf', weight: 500, italic: true },
  { url: 'NotoSans-SemiBold.ttf', weight: 600 },
  { url: 'NotoSans-SemiBoldItalic.ttf', weight: 600, italic: true },
  { url: 'NotoSans-Bold.ttf', weight: 700 },
  { url: 'NotoSans-BoldItalic.ttf', weight: 700, italic: true },
  { url: 'NotoSans-ExtraBold.ttf', weight: 800 },
  { url: 'NotoSans-ExtraBoldItalic.ttf', weight: 800, italic: true },
  { url: 'NotoSans-Black.ttf', weight: 900 },
  { url: 'NotoSans-BlackItalic.ttf', weight: 900, italic: true },
];

const fontFallback = {
  fonts: {
    [FontCharset.CYRILLIC]: latinFonts,
    [FontCharset.GREEK]: latinFonts,
    [FontCharset.VIETNAMESE]: latinFonts,
  },
  baseUrl: 'https://cdn.jsdelivr.net/npm/@embedpdf/fonts-latin@1/fonts',
};

Or use the pre-configured CDN config:

import { cdnFontConfig } from '@embedpdf/engines/pdfium';

const native = new PdfiumNative(pdfiumModule, {
  fontFallback: cdnFontConfig,
});

License

These fonts are licensed under the SIL Open Font License 1.1.

Noto Sans is a trademark of Google LLC.

版本与发布记录

@embedpdf/fonts-latin 共发布 1 个版本,首次发布于 2025/12/28;过去 12 个月发布了 1 个版本。

版本发布日期距今
1.0.0latest2025/12/2810 个月前

关于 @embedpdf/fonts-latin 的常见问题

@embedpdf/fonts-latin 是什么?

Latin/European fallback fonts for EmbedPDF - Noto Sans (9 weights × 2 styles)

如何安装 @embedpdf/fonts-latin?

在项目目录运行 npm install @embedpdf/fonts-latin,或使用 pnpm add / yarn add / bun add。

@embedpdf/fonts-latin 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@embedpdf/fonts-latin 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@embedpdf/fonts-latin 可以商用吗?

@embedpdf/fonts-latin 使用 OFL-1.1 许可。声明的许可为 OFL-1.1,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@embedpdf/fonts-latin 的下载量有多少?

根据 npm 官方下载统计,@embedpdf/fonts-latin 在 2026/10/14 – 2026/11/12 这 30 天内被下载 3,145,314 次,日均约 104,844 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@embedpdf/fonts-latin 还在维护吗?

最新版本 1.0.0 发布于 2025/12/28(10 个月前);至今共发布 1 个版本,其中过去 12 个月发布了 1 个;首次发布于 2025/12/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。