fix: add CJK font support for PDF conversion

When converting documents containing Chinese, Japanese, or Korean
characters to PDF via pandoc/xelatex, the output was blank or missing
glyphs because no CJK-capable font was installed or configured.

Changes:
- Dockerfile: Add fonts-noto-cjk and texlive-lang-chinese packages
- pandoc.ts: Pass -V CJKmainfont=Noto Sans CJK SC to pandoc when
  converting to pdf/latex, so xelatex uses a CJK-capable font
- pandoc.test.ts: Add 3 tests verifying CJK font argument is present
  for pdf/latex output and absent for other formats

Fixes #547
This commit is contained in:
Ryo 2026-07-02 09:55:01 +08:00
parent 393441faa1
commit 143ade3d36
3 changed files with 48 additions and 0 deletions

View file

@ -73,9 +73,11 @@ RUN apt-get update && apt-get install -y \
resvg \
texlive \
texlive-fonts-recommended \
texlive-lang-chinese \
texlive-latex-extra \
texlive-latex-recommended \
texlive-xetex \
fonts-noto-cjk \
python3 \
python3-pip \
pipx \