mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-12 22:14:54 +10:00
5b1297fa2b
The CJK fallback (Noto Sans SC / Noto Serif SC) was only registered at weight 400. When react-pdf rendered CJK characters with font-weight 700 (e.g. <strong> from a rich-text section, or templates' bold style), it walked the font-family stack [primary, cjkFallback], failed on the primary (no CJK glyphs), then fell back to the only registered fallback variant (400) — and react-pdf does not synthesize bold. The bold style was silently dropped for CJK runs in both the live preview and the exported PDF, while still working for Latin runs. Register the CJK fallback at the same weight range as the primary font (lowest + highest, both styles). When body and heading share the same fallback (the common case where both are sans or both are serif), merge their weight ranges so each weight is registered exactly once. webfontlist.json already ships all weights for the default CJK fallbacks, so no font-list changes are required. Closes #3079 Co-authored-by: Amruth Pillai <im.amruth@gmail.com>