mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-26 10:47:11 -06:00
- Unicode bidi (unicode-bidi, unicode-script, unicode-general-category):
each paragraph's direction from its first strong character, Hebrew and
Arabic shaped right to left, embedded Latin and numbers keep theirs,
lines wrapped in logical order and reordered per line by whole
clusters; source text, undo and style ranges stay logical.
- Caret, hit testing, selection and the arrow keys follow the visual
order.
- New text aligns automatically: right-to-left paragraphs right, others
left (Justify::Auto, text.setStyle {justify: "auto"}); the Paragraph
panel highlights the resolved alignment and has an Automatic alignment
toggle. Explicit alignments, and older documents', are kept.
- SVG export outlines bidirectional text (with a warning) until it can
be written as directional live text.
34 lines
1.1 KiB
TOML
34 lines
1.1 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"
|
|
# 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"
|