Commit Graph
11 Commits
Author SHA1 Message Date
Dylan M. Taylor 6c1391d4de Text: run lookup by bisection, bounded path flattening, font folders and files shared (#2991)
* Text: run lookup by bisection, bounded path flattening, font folders and files shared

run_at scanned the style runs from the first for every character; the
ordered runs are now bisected (the scan remains for gaps). Path text
flattened at a fixed 0.05 tolerance, so huge coordinates made hundreds of
millions of points; the tolerance grows with the path's size and
non-finite paths measure nothing. Font name records aliasing one string
are decoded once. The font folder walk listed folders reached through
several links again along every path; each real folder is listed once.
Faces of one font collection each read the whole file; they share it.

* address review: font walk breadth-first across roots, font file cache keyed by size and mtime and read outside the lock, first-subpath path measure with finite check, scratch dir guard

* address review: font files shared through file_bytes with the open file's metadata; run lookup by bisection only for ordered runs

* Pass the runs' ordered flag with them to stay under the argument limit

* address review: reversed run ranges take the scan
2026-11-11 14:40:29 -05:00
dotCooCoo 1981d86c54 Make font substitute test work with installed originals 2026-10-29 22:22:07 -07:00
bflatastic 8d051b3e9a Merge remote-tracking branch 'origin/main' into HEAD 2026-10-30 05:42:41 +07:00
BFlat faab5b1c81 Merge pull request #2039 from midasdf/jp/cjk-composition-rendering
Text: Chinese Han text uses the installed Chinese face (#453)
2026-10-30 05:10:35 +07:00
Madhav Agarwal bad35b0092 tests: compare font styles case-insensitively and use instance attributes 2026-10-29 13:28:31 +05:30
Vikram Bhaskaran 835a793096 Merge origin/main into fix/1089-fedora-fonts. 2026-10-29 17:11:12 +11:00
midasdf cbd67baf36 Text: the zh-hans Han order test replaces the skipping render test (#2039)
The CJK render test skipped wherever no Japanese face was installed, which
is every CI runner, and on a Mac it drew glyphs with or without the fix, so
it caught nothing. Replace it with a fallback-order test: fixture faces for
`Hiragino Sans` and `Hiragino Sans GB` show that a zh-hans Han lookup tries
the Chinese family first, that ja tries the Japanese one, and that a layout
gets Hiragino Sans GB. Synthetic fonts in an isolated child process keep it
independent of the host's fonts; with the Simplified list reverted it fails
on `[7]` against `[8, 7]`.

Delete `TEST_CJK_LOCALE`: the locale-mutating tests moved to an isolated
child process, so nothing used the lock and the test-only static failed
clippy's `-D warnings` gate.

Trim the documentation edits to the single docs/gaps.md gap-11 row: revert
the header and changelog edits in ROADMAP.md, docs/roadmap.md,
docs/localization-parity.md and docs/target-app-parity.md, and the gaps.md
header and changelog row, which conflict with other PRs.

Tests: cargo clippy -p effectcraft-text -p effectcraft-render --all-targets
-- -D warnings, cargo clippy --workspace --all-targets -- -D warnings,
cargo test -p effectcraft-text (79 lib), cargo test -p effectcraft-render
(264 passed, 1 ignored perf test), cargo fmt --all -- --check.
2026-10-29 14:47:22 +09:00
Madhav Agarwal 90acacd917 tests: match retained font faces and primary-style precedence 2026-10-29 10:20:06 +05:30
Madhav Agarwal cd8d55b40e tests: count variable font named instances as styles (#2072) 2026-10-29 10:19:58 +05:30
Dylan M. Taylor 7c74960c6f Refactor text for strict Clippy checks 2026-10-28 06:09:20 +00:00
aiongg 2e76b5f8b2 refactor(text): move src/fonts.rs tests to src/fonts/tests.rs 2026-10-26 21:49:11 +00:00