fix(docker): add CJK fonts for Chinese/Japanese/Korean PDF rendering (#777)#785
Open
Frankli9986 wants to merge 1 commit into
Open
fix(docker): add CJK fonts for Chinese/Japanese/Korean PDF rendering (#777)#785Frankli9986 wants to merge 1 commit into
Frankli9986 wants to merge 1 commit into
Conversation
…rbhr#777) The Docker image used python:3.13-slim-bookworm which does not include any CJK fonts. Playwright/Chromium relies on system font fallback for rendering Chinese characters in PDF exports. Without CJK fonts, Chinese resumes render as garbled text / boxes. Changes: - Add fonts-noto-cjk to Dockerfile apt-get install block - Covers Chinese, Japanese, and Korean characters Closes srbhr#777
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #777
Problem
Users running Resume-Matcher via Docker (
docker compose up) experience garbled / box-character output when exporting Chinese resumes to PDF. The same code works correctly when running from source, because the host OS has CJK fonts installed.Root Cause
The Docker image uses
python:3.13-slim-bookwormas its base, which is a minimal Debian image that does not include any CJK fonts. PDF rendering uses Playwright + headless Chromium, which relies on system font fallback for Chinese characters. Without CJK fonts available in the container, Chromium has nothing to fall back to.Fix
Add
fonts-noto-cjkto the Dockerfile'sapt-get installblock. This package provides comprehensive CJK font coverage (Chinese, Japanese, Korean) and is the standard choice for Debian-based containers.Verification
After rebuilding the image:
docker compose upImpact
ja) resume exportsSummary by cubic
Fixes garbled CJK text in PDF exports when running via Docker by installing
fonts-noto-cjkin thepython:3.13-slim-bookwormimage. Addresses #777 and improves Chinese/Japanese/Korean rendering inPlaywright/Chromium, with ~150MB image size increase and no app code changes.docker compose up.Written for commit c9528ef. Summary will update on new commits.