vectorcraft/crates/text/src
bflatastic dd595cf2e8 Fix #260: tate-chu-yoko numbers and upright glyphs keep their own cell in vertical text
In vertical type every character now sits in its own cell down the column:
"10" and "22" in 「10月22日」 stand side by side in one em, centred on the
column, and 月/日 start right after them. Justified (Justify All) columns
no longer split a tate-chu-yoko block, and tracked or justified upright
characters stay on the column's centre line instead of drifting across it.

Root cause: in 0.3.1 (the reporter's build) upright glyphs were placed by
the font's ascent rather than the ideographic em box, so a font with a tall
ascent (Noto Sans CJK JP, 1.16 em) drew each upright character ~0.28 em
down into the next cell, onto the sideways digits; #208 (after 0.3.1)
replaced that with em-box placement and tate-chu-yoko, which this commit
locks in with regression tests. Two defects of the same kind remained:
Justify All added its inter-character gap inside a tate-chu-yoko block
(the block's second digit slid down the column, away from the first), and
upright glyphs turned about the middle of their advance, which tracking and
justification lengthen, instead of the middle of their own cell.

Tests: the issue's layout with bundled glyphs (cells one after the other,
every ink inside its cell and no overlaps, 2-3 digit blocks one em and
centred, single digits and 2026 on their side advancing by their length,
spaces), the issue's string with craft-fonts' Japanese face (skips without
craft-fonts), Justify All with a block, tracking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:16:44 +07:00
..
composer.rs Live Blends/Envelopes/Gradient Mesh, Shape Builder, Live Paint, Image Trace (drawcraft-trace), Recolor Artwork, Export for Screens, Actions panel, prefs persistence, real layer thumbnails; menus bound 2026-09-30 11:02:16 -04:00
craft_fonts.rs Fonts: use craft-fonts as an optional build input; move the Japanese fonts out 2026-10-06 10:42:21 -04:00
edit.rs Rename DrawCraft → VectorCraft: crates (vectorcraft-*), apps, binaries, types, env vars, docs, examples (.vectorcraft); old .drawcraft files and preferences still load. Fix: text bounds exact after opening a file; selection no longer marks a document modified (dirty = content differs from the saved document). Screenshots and renders regenerated. 2026-10-01 14:30:09 -04:00
embed.rs M4.97: SVG Options choose the encoding, SVG Tiny 1.2 and embedded font subsets 2026-10-05 13:25:15 +07:00
features.rs Type: kinsoku, tate-chu-yoko and upright placement for vertical type 2026-10-06 22:02:38 +09:00
fontdb.rs Merge pull request #228 from EthanSuquet/fix/hide-dot-system-fonts 2026-10-06 15:57:48 -04:00
hyphen.rs Live Blends/Envelopes/Gradient Mesh, Shape Builder, Live Paint, Image Trace (drawcraft-trace), Recolor Artwork, Export for Screens, Actions panel, prefs persistence, real layer thumbnails; menus bound 2026-09-30 11:02:16 -04:00
layout.rs Fix #260: tate-chu-yoko numbers and upright glyphs keep their own cell in vertical text 2026-10-07 12:16:44 +07:00
lib.rs Merge main into #208 (after #207 and #209): keep both IME and vertical-arrow tests 2026-10-06 15:44:50 -04:00
shape.rs Fix #260: tate-chu-yoko numbers and upright glyphs keep their own cell in vertical text 2026-10-07 12:16:44 +07:00
tests.rs Fonts: use craft-fonts as an optional build input; move the Japanese fonts out 2026-10-06 10:42:21 -04:00
tests_embed.rs M4.97: SVG Options choose the encoding, SVG Tiny 1.2 and embedded font subsets 2026-10-05 13:25:15 +07:00
tests_scripts.rs M4.20: Document Setup with bleed, transparency grid, paper and type options 2026-10-05 08:28:16 +07:00
tests_snap.rs M4.34: raster export options and PNG Options — resolution, background, anti-aliasing, interlacing 2026-10-05 09:14:11 +07:00
tests_sysfonts.rs Merge pull request #228 from EthanSuquet/fix/hide-dot-system-fonts 2026-10-06 15:57:48 -04:00
tests_typo.rs Robustness: VectorCraft never crashes — no panics in shipped code 2026-10-05 06:28:59 +07:00
tests_vertical.rs Fix #260: tate-chu-yoko numbers and upright glyphs keep their own cell in vertical text 2026-10-07 12:16:44 +07:00
thread.rs Rename DrawCraft → VectorCraft: crates (vectorcraft-*), apps, binaries, types, env vars, docs, examples (.vectorcraft); old .drawcraft files and preferences still load. Fix: text bounds exact after opening a file; selection no longer marks a document modified (dirty = content differs from the saved document). Screenshots and renders regenerated. 2026-10-01 14:30:09 -04:00