vectorcraft/crates/text
dotCooCoo a1a27636e1 Fonts: a missing font's name is looked up once until fonts are added or rescanned
For a name that is neither a loaded nor an installed family,
FontDb::canonical built the list of names of every loaded face on
every call. Layout asks for a style's face for each span it shapes
and three more times per paragraph, so the time to lay out type set
in a font that is not installed grew with the number of fonts loaded:
a story of 1,000 paragraphs took a median of 409 to 507 ms in a
release build with 400 fonts added.

The database now keeps canonical's answer for each such name and style
until fonts are added or rescanned, and it keeps at most 4,096
answers. The same story takes a median of 56 to 71 ms, and canonical
gives the same answers as before.

Docs: docs/target-app-parity.md.
2026-10-14 06:01:10 +07:00
..
build build(web): copy web fonts with cargo xtask, not sh 2026-10-09 17:18:54 +03:00
src Fonts: a missing font's name is looked up once until fonts are added or rescanned 2026-10-14 06:01:10 +07:00
tests Fix #130: installed fonts are found by name whatever ran before 2026-10-06 00:49:06 +07:00
Cargo.toml Type: Thai, Lao, Khmer and Myanmar lines break between words 2026-10-11 19:31:37 +07:00
build.rs Build: generated sources are rewritten only when they change 2026-10-11 07:13:32 +07:00
web-fonts.txt Type: Noto Sans Thai from craft-fonts is the Thai fallback, on the web too 2026-10-11 19:52:08 +07:00