Skip to content

墨痕归卷,字库随行 · Bundle CJK fallback fonts for PDFium - #55

Open
eric8810 wants to merge 1 commit into
mainfrom
codex/fix-pdf-font-fallback
Open

墨痕归卷,字库随行 · Bundle CJK fallback fonts for PDFium#55
eric8810 wants to merge 1 commit into
mainfrom
codex/fix-pdf-font-fallback

Conversation

@eric8810

Copy link
Copy Markdown
Contributor

Summary

  • bundle checksum-pinned Noto Sans CJK SC and its OFL license in every native npm platform package
  • rebuild the exact reviewed pdfium-native 0.6.1 addon so PDFium initializes from the package-local font directory
  • add a deterministic non-embedded STSong-Light fixture that gates font selection, rendered PNG content, and end-to-end Chinese OCR
  • advance the immutable release closure to Core/native 0.5.6, runtime 0.1.6, Document 0.1.2, and Tiny/Medium 0.1.5

Why

The 0.5.5 packages include PDFium but no fallback fonts. A PDF that references a Chinese font without embedding glyphs can therefore become blank or tofu-like during rendering before OCR sees the page. This change closes that renderer dependency inside npm and keeps install/runtime free of secondary downloads.

Validation

  • macOS arm64 real PDFium render: STSong-Light -> Noto Sans CJK SC, non-empty PNG
  • end-to-end default model OCR: 中文测试
  • Unicode installation-path loader smoke
  • 17 Python release/patch/CI contract tests
  • 72 focused Node tests plus all workspace tests
  • strict TypeScript typecheck
  • git diff --check

Six-platform package smoke remains the required CI evidence before release.

Bundle a checksum-pinned Noto Sans CJK SC font in every native npm package and initialize the reviewed PDFium source against that package-local directory.

Gate non-embedded Chinese rendering and OCR in the offline six-platform package smoke, and advance the release closure to conservative patch versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant