mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
The font database made one style per font file, so a variable font such as Figtree[wght].ttf listed only its default instance (Light). Faces now also yield their fvar named instances, each a style of the family named by its subfamily name (the default instance is the face itself; unnamed or duplicate instances are left out; axes and instances read are capped). The system font scan reads the fvar table beside the name table, so installed instances are listed before the file is loaded and found by name and by PostScript name. An instance face carries its axis settings: skrifa draws its outlines and reads its metrics and advances at that location, harfrust shapes with a ShaperInstance, so layout, the canvas, Create Outlines and hit testing all use the instance. PDF export embeds it through krilla's Font::new_variable, SVG @font-face through subsetter's subset_with_variations: both write a static font of that instance. Tests build a small variable font in code (test_fonts, via write-fonts; no font file is committed) and check listing, resolving, glyphs and advances, PDF and SVG export and damaged fvar/gvar tables; Bahnschrift and Segoe UI Variable are checked where installed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
39 lines
1.2 KiB
TOML
39 lines
1.2 KiB
TOML
[package]
|
|
name = "vectorcraft-svg"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "VectorCraft SVG import and export"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
vectorcraft-geom = { workspace = true }
|
|
vectorcraft-color = { workspace = true }
|
|
vectorcraft-doc = { workspace = true }
|
|
vectorcraft-effects = { workspace = true }
|
|
vectorcraft-brush = { workspace = true }
|
|
vectorcraft-text = { workspace = true }
|
|
kurbo = { workspace = true }
|
|
usvg = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
serde = { workspace = true }
|
|
# Live effect params read from filters.
|
|
serde_json = { workspace = true }
|
|
# SVGZ (gzip, pure-Rust backend: builds for wasm).
|
|
flate2 = { workspace = true }
|
|
image = { workspace = true }
|
|
# Colour / transform / length parsing for the <text> fallback (MIT OR Apache-2.0; already used by usvg).
|
|
svgtypes = "0.16"
|
|
|
|
[dev-dependencies]
|
|
# Reading embedded font subsets back.
|
|
skrifa = { workspace = true }
|
|
# A variable font built in code (no font file is committed).
|
|
vectorcraft-text = { workspace = true, features = ["test-fonts"] }
|
|
resvg = { version = "0.45", default-features = false }
|
|
vectorcraft-testkit = { workspace = true }
|
|
proptest = { workspace = true }
|
|
image = { workspace = true }
|