[package]
name = "dxpdf"
version = "0.2.11"
edition = "2021"
description = "A fast DOCX-to-PDF converter powered by Skia"
license = "MIT"
repository = "https://github.com/nerdy-pro/dxpdf"
homepage = "https://nerdy.pro"
documentation = "https://docs.rs/dxpdf"
readme = "README.md"
keywords = ["docx", "pdf", "converter", "word", "ooxml"]
categories = ["command-line-utilities", "text-processing"]
exclude = ["test-cases/", "test-files/", "scripts/", "VISUAL_COMPARISON.md", "BENCHMARKS.md"]

[lib]
crate-type = ["rlib", "cdylib"]

[dependencies]
bitflags = "2"
quick-xml = { version = "0.39", features = ["serialize"] }
serde = { version = "1", features = ["derive"] }
zip = { version = "2", default-features = false, features = ["deflate"] }
skia-safe = "0.93"
thiserror = "2"
log = "0.4"
env_logger = "0.11"
clap = { version = "4", features = ["derive"] }
pyo3 = { version = "0.24", features = ["extension-module"], optional = true }
fontcull = { version = "2", optional = true }
unicode-segmentation = "1.13.2"
unicode-properties = "0.1.4"
unicode-normalization = "0.1.25"
rustybuzz = "0.20.1"

[features]
default = ["subset-fonts"]
python = ["pyo3"]
# `fontcull` (Google's klippa packaged for Rust) produces a *complete* subsetted
# SFNT — cmap, hhea, OS/2 preserved — so Skia can shape against it normally
# during paint. The earlier `subsetter` (Typst) crate strips cmap by design,
# which broke Skia's draw_str path: every codepoint mapped to .notdef.
subset-fonts = ["dep:fontcull"]

[dev-dependencies]
tempfile = "3"
criterion = { version = "0.5", features = ["html_reports"] }
lopdf = { version = "0.40", default-features = false }

[[bench]]
name = "convert_bench"
harness = false

[[bench]]
name = "parse_bench"
harness = false
