Roadmap 0.9, Fixes

FX.3 CadCraft: Thai text prints in a PDF plot (was "?")

  • Fix
  • Built · Live
  • CadCraft

Reported on CadCraft 0.7.1 in the browser: PLOT to PDF printed every Thai character as a question mark (command line: '219 characters the PDF font has no glyph for'). Cause: plot.js embedded Liberation Sans (Latin, Greek, Cyrillic) and fell back only to the CJK font, which has no Thai. Fixed in the a Discord member build: a Thai font (Noto Sans Thai, OFL 1.1, Thai + Latin + digits, ~220 KB, assets/vendor/thai-sans, current symlink) is fetched only when a plot has Thai text, subset to the glyphs used and embedded with a ToUnicode map. Thai tone marks are placed by pdf-font.js (the font has no layout engine here): centred over upper vowels, over sara am's ring (น้ำ), left of tall consonants (ป่ ฝ่ ฟ้), lower vowels under ญ ฐ. Checked by rendering a PDF (ที่ นี้ ผู้ ก็ ป่า น้ำ ห้องน้ำ พื้น ชั้น) and by 6 new tests in bin/test-cadcraft.mjs (2772 pass). Not covered: characters the Thai font lacks (± and ⌀ print "?" in a Thai plot and are counted in the report); one font per file, so a drawing with Thai and Chinese together keeps whichever leaves fewer "?"; Arabic, Hebrew and Indic scripts still have no font; SVG / PNG plots use the browser's fonts and were not changed. LIVE in the browser edition since 2026-11-03 as CadCraft 0.8.2 (0.8.1 plus only these files; docs/releases/0.8.2.md). Studio and the desktop apps get it with the next Studio build.

From: site feedback

Add a comment

Community comments

No comments yet

Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.

Sign in or create a free account to add a comment.