mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-11-30 16:37:18 +01:00
Replace bundled font programs with glyph data. Generate replacement fonts with PDF widths and substitutes for missing XFA fonts. Use a JavaScript fallback when WASM is disabled or fails to load.
995 B
995 B
Build
Requires Docker. In a Hellbox checkout, run:
node build.js -C
node build.js -co /pdf.js/external/hellbox/ --no-embedded-data --js-fallback
Copy rust/data/LICENSE_* here. Omit Wingdings.hbgd, which PDF.js doesn't use.
Usage
src/core/hellbox.js generates TrueType substitutes for non-embedded standard
and XFA fonts. Viewer builds put hellbox_bg.wasm and
hellbox_nowasm_fallback.js in wasm/, and glyph data in standard_fonts/
(standardFontDataUrl).
Glyph data comes from Arimo, Tinos, Liberation Mono, and Noto fonts.
Licensing
- Hellbox: MPL-2.0 (
LICENSE_HELLBOX). - Font data: SIL Open Font License 1.1 (
LICENSE_ARIMO,LICENSE_TINOS,LICENSE_LIBERATION,LICENSE_NOTO). unicode.bin: Unicode License v3 (LICENSE_UNICODE).