mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-11-30 16:37:18 +01:00
The Unicode tables are coded with the range coder of Hellbox: unicode.bin is 2,639 bytes instead of 14,262, the Wasm module 131,848 bytes instead of 132,729, and the JS fallback 60,131 bytes with Brotli instead of 59,029.
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).