mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 15:55:14 +00:00
* ps: add a write feature for PostScript tokens Numbers, strings, matrices, path data and Flate, so apps can emit a PostScript or EPS program without owning the token serializer. Path and paint operators can use the Language Reference names or the one-letter names a bound prolog defines. Container concerns stay in craft-eps. Part of #778 and #790. * ps: tighten write-feature number trimming and Flate bounds - Require flate2 1.1.10 so inflate rejects an incomplete zlib stream. - Trim trailing zeros only when the token has a decimal point, so places=0 keeps integer zeros at the 1e15 boundary. - Use saturating_add when bounding inflate, so max = u64::MAX does not overflow.
30 lines
936 B
TOML
30 lines
936 B
TOML
[package]
|
|
name = "craft-ps"
|
|
description = "PostScript and EPS for Craft apps: writing primitives, and an EPS interpreter that paints into PDF"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = []
|
|
read = ["dep:craft-eps", "dep:pdf-writer", "dep:miniz_oxide", "dep:weezl", "dep:skrifa", "dep:kurbo"]
|
|
write = ["dep:kurbo", "dep:flate2"]
|
|
|
|
[dependencies]
|
|
craft-eps = { workspace = true, optional = true }
|
|
pdf-writer = { workspace = true, optional = true }
|
|
miniz_oxide = { workspace = true, optional = true }
|
|
weezl = { workspace = true, optional = true }
|
|
skrifa = { workspace = true, optional = true }
|
|
kurbo = { workspace = true, optional = true }
|
|
flate2 = { version = "1.1.10", default-features = false, features = ["rust_backend"], optional = true }
|
|
|
|
[[example]]
|
|
name = "eps2pdf"
|
|
required-features = ["read"]
|