Files
Calixte Denizet f16437faec Generate non-embedded standard fonts with Hellbox
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.
2026-11-03 18:03:47 +01:00

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).