From 6a9c3365dd8a00dfadeda6a77eb897c1e4078ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=B9=E6=B3=A2?= Date: Sun, 14 Dec 2025 22:30:34 +0800 Subject: [PATCH] feat: add chinese font support for pandoc --- Dockerfile | 10 ++++++++++ docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile index bbf2327..563b2c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -74,9 +74,19 @@ RUN apt-get update && apt-get install -y \ texlive-latex-extra \ texlive-latex-recommended \ texlive-xetex \ + texlive-lang-chinese \ + fonts-noto-cjk \ + fonts-wqy-zenhei \ + fonts-wqy-microhei \ + fonts-arphic-ukai \ + fonts-arphic-uming \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/* +RUN mkdir -p /usr/share/fonts/truetype/chinese && \ + ln -sf /usr/share/fonts/truetype/noto /usr/share/fonts/truetype/chinese/noto && \ + fc-cache -f -v + # Install VTracer binary RUN ARCH=$(uname -m) && \ if [ "$ARCH" = "aarch64" ]; then \ diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7cc9b27 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +services: + convertx: + image: convertx:pandoc-support-chinese + container_name: convertx + restart: unless-stopped + ports: + - "3001:3000" + environment: + - JWT_SECRET=ivanzhangwb # will use randomUUID() if unset + - HTTP_ALLOWED=true # uncomment this if accessing it over a non-https connection + - PANDOC_ENABLE_CHINESE_FONT=true + - PANDOC_CHINESE_FONT_FAMILY=Noto Serif CJK SC + - PANDOC_CHINESE_FONT_PATH=/usr/local/share/fonts/chinese + volumes: + - /home/admin/data/docker/convertX:/app/data + - /usr/share/fonts:/usr/local/share/fonts/chinese:ro \ No newline at end of file