convertor/tests/converters
Ryo 0abd934046 fix: make CJK font conditional and locale-aware
Address code review feedback from cubic-dev-ai:

P1: Unconditionally passing CJKmainfont broke non-CJK conversions in
environments without CJK fonts. Now the source file is scanned for CJK
characters and the font argument is only added when CJK content is
detected.

P2: Hardcoded Noto Sans CJK SC only covers Simplified Chinese. Now
detects the specific CJK language (Japanese Kana, Korean Hangul, or
Chinese Hanzi) and selects the appropriate font variant (JP/KR/SC).

Changes:
- Add detectCJKFont() that reads the source file and returns the
  correct Noto Sans CJK variant, or null for non-CJK content
- CJK font argument is only added when detectCJKFont returns non-null
- Detection order: Japanese (Kana) > Korean (Hangul) > Chinese (Hanzi)
  since Japanese also uses Kanji shared with Chinese
- Graceful fallback: if file can't be read, no CJK font is added
- Update tests to use temp files with real CJK content (11 tests total)
2026-07-02 10:23:16 +08:00
..
helpers feature: add download all file by file alongside the tar download (#415) 2025-10-07 21:27:31 +02:00
assimp.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
calibre.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
dasel.test.ts test: add awaits to rejects and resolves 2025-12-14 02:57:00 +01:00
dvisvgm.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
ffmpeg.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
graphicsmagick.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
imagemagick.test.ts feature: add download all file by file alongside the tar download (#415) 2025-10-07 21:27:31 +02:00
inkscape.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
libheif.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
libjxl.test.ts feature: add download all file by file alongside the tar download (#415) 2025-10-07 21:27:31 +02:00
libreoffice.test.ts PDF to DOCX using LibreOffice, fixes #425 (#510) 2026-01-29 17:20:12 +01:00
msgconvert.test.ts feature: add download all file by file alongside the tar download (#415) 2025-10-07 21:27:31 +02:00
pandoc.test.ts fix: make CJK font conditional and locale-aware 2026-07-02 10:23:16 +08:00
potrace.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
resvg.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00
vcf.test.ts feat: add VCF to CSV converter (#497) 2026-01-11 16:38:32 +01:00
vips.test.ts feature: add download all file by file alongside the tar download (#415) 2025-10-07 21:27:31 +02:00
vtracer.test.ts test: add awaits to rejects and resolves 2025-12-14 02:57:00 +01:00
xelatex.test.ts test: fix imports after eslint config changes 2025-08-11 15:09:20 +02:00