mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
These scripts don't separate words with spaces, and lines only broke at spaces, hyphens and CJK characters, so a Thai paragraph in area type ran on to the next space (or was cut wherever it overflowed). Each paragraph's glyphs now carry the word ends ICU4X's line segmenter finds in text of those scripts (its dictionaries on the desktop, its far smaller LSTM models on the web), and a line may break after them as after a space. Other text keeps its own breaks, and clusters (a consonant with its vowel and tone marks) still never split. Co-Authored-By: Claude Opus 5.5 <[email protected]>
46 lines
1.9 KiB
TOML
46 lines
1.9 KiB
TOML
[package]
|
|
name = "vectorcraft-text"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft text: font database, shaping, layout, glyph outlines"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
kurbo = { workspace = true }
|
|
skrifa = { workspace = true }
|
|
harfrust = { workspace = true }
|
|
log = { workspace = true }
|
|
# Font subsets for embedding (SVG @font-face); MIT OR Apache-2.0, already used by the PDF writer
|
|
# (which turns on `variable-fonts` too: named instances of variable fonts are instanced).
|
|
subsetter = { version = "0.2", default-features = false, features = ["variable-fonts"] }
|
|
unicode-bidi = "0.3.18"
|
|
unicode-general-category = "1"
|
|
unicode-script = "0.5"
|
|
# Word boundaries in scripts written without spaces between words (Thai, Lao, Khmer, Myanmar), where
|
|
# lines may break: ICU4X's line segmenter (Unicode-3.0, as icu_properties already in the build),
|
|
# with its dictionaries on the desktop and its far smaller LSTM models on the web.
|
|
icu_segmenter = "2.3"
|
|
# Grapheme clusters (a Thai consonant with its vowel and tone marks, an accented letter, an emoji
|
|
# sequence) for caret movement; MIT OR Apache-2.0, already in the build.
|
|
unicode-segmentation = "1.13"
|
|
# Builds a small variable font for tests (`test_fonts`; no font file is committed). MIT OR
|
|
# Apache-2.0, already in the build through subsetter.
|
|
write-fonts = { version = "0.48", optional = true }
|
|
|
|
[features]
|
|
# `vectorcraft_text::test_fonts` for other crates' tests (dev-dependencies only).
|
|
test-fonts = ["dep:write-fonts"]
|
|
|
|
[dev-dependencies]
|
|
write-fonts = "0.48"
|
|
|
|
# Fonts registered with Windows outside its font folders ("install as shortcut", installers);
|
|
# MIT OR Apache-2.0, a safe wrapper of the registry API from the windows-rs project.
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows-registry = "0.6"
|