vectorcraft/crates/text/src
dotCooCoo 8754646784 Type: frames and paths beyond 1,000,000,000 pt hold no text, and layout limits its search for room
Opening an EPS whose threaded area type frame has a control point at
x = 8e115 failed with an internal error ("capacity overflow").
`eps_text_frames_never_panic` in `import_fuzz` found it with
PROPTEST_CASES=20000. Text layout flattens a frame to within 0.1 pt,
and for such a curve kurbo 0.13.1's `flatten` calls `reserve` for
`usize::MAX` quadratic pieces. Laying out text around a wrap shape with
such a curve failed the same way. Laying out type on a path along such
a curve panicked in kurbo's `solve_itp` ("attempt to shift left with
overflow") in builds with overflow checks, and in a release build it
did not finish within 20 s. Laying out area type in a triangle frame
that comes to a point at its top, at y = 1e20, did not finish either:
adding a lead to a baseline that large leaves the baseline where it is.

Text layout now leaves out a frame, a text wrap shape or the path of
type on a path that has a coordinate beyond 1,000,000,000 pt either
way, control points included, or a NaN coordinate in an anchor point.
Such a frame or path holds no text, and such a wrap shape is ignored.
PDF export uses the same bound (`MAX_COORD` in
`crates/pdf/src/export.rs`).

Text layout also steps a line down a frame cell at most 100,000 times
to find room for it. In a cell taller than 100,000 leads, a step is the
cell's height divided by 100,000; in a shorter cell, a step is one
lead, as before. Before this change, in a dev build, with triangle
frames that come to a point at their top, laying out text in one
2,000,000,000 pt tall took 9.8 s, and laying out a paragraph whose
Space Before is -1e300 pt in one 1,000 pt tall did not finish within
20 s.
2026-10-13 00:34:40 +07:00
..
composer.rs M7: Every-line Composer for ragged text 2026-10-08 14:03:33 -07:00
craft_fonts.rs Type: Noto Sans Thai from craft-fonts is the Thai fallback, on the web too 2026-10-11 19:52:08 +07:00
edit.rs Type: the caret and double-click take Thai word by word 2026-10-11 20:06:39 +07:00
embed.rs Fix #296: variable fonts list and draw every named style 2026-10-07 21:01:26 +07:00
features.rs Type: Proportional Metrics bring their kerning — `apkn` with `palt`, `vkrn` and `vapk` with `vpal` (#966) 2026-10-12 07:25:55 +07:00
fontdb.rs Fonts: a character no font covered is looked for again after a font rescan (#992) 2026-10-12 16:43:41 +07:00
hyphen.rs Hyphenation exceptions: unit tests read only their thread's list 2026-10-10 06:02:48 +07:00
layout.rs Type: frames and paths beyond 1,000,000,000 pt hold no text, and layout limits its search for room 2026-10-13 00:34:40 +07:00
lib.rs Fix #1423: an Affinity text frame too short for its first line is made taller instead of showing nothing 2026-10-12 23:42:56 +07:00
shape.rs Type: Proportional Metrics bring their kerning — `apkn` with `palt`, `vkrn` and `vapk` with `vpal` (#966) 2026-10-12 07:25:55 +07:00
suitcase.rs Fonts: a folder search skips suitcase fonts whose resource fork is over 8 MB 2026-10-10 08:42:32 +07:00
test_fonts.rs Fix #813: type can name an installed version of its font 2026-10-09 19:26:51 +00:00
tests.rs Release: embed the current craft-fonts (Thai, Arabic, Chinese) 2026-10-11 20:47:46 +07:00
tests_bidi.rs TEST.1: correct font shaping and embedding oracles 2026-10-12 06:59:49 +07:00
tests_combos.rs M7: tests for the text engine features combined 2026-10-08 20:30:14 -07:00
tests_embed.rs Package: fonts found by any of their names are copied, and skipped fonts are named 2026-10-09 08:35:16 -07:00
tests_fit.rs #1034: scaled type shows and takes its scaled sizes 2026-10-11 07:00:34 +07:00
tests_inline.rs M7: inline art follows vertically aligned lines 2026-10-08 20:30:14 -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 Fonts: a character no font covered is looked for again after a font rescan (#992) 2026-10-12 16:43:41 +07:00
tests_typo.rs Type: frames and paths beyond 1,000,000,000 pt hold no text, and layout limits its search for room 2026-10-13 00:34:40 +07:00
tests_variable.rs fix: フォントのフルネームを正しい書体へ解決する #1258 2026-10-12 07:25:51 +07:00
tests_versions.rs Fix #813: type can name an installed version of its font 2026-10-09 19:26:51 +00:00
tests_vertical.rs Type: Proportional Metrics bring their kerning — `apkn` with `palt`, `vkrn` and `vapk` with `vpal` (#966) 2026-10-12 07:25:55 +07:00
thread.rs M7: inline symbols in text 2026-10-08 15:45:34 -07:00