[package] name = "obscura-render" version.workspace = true edition.workspace = true license.workspace = true repository.workspace = true description = "Optional scoped render layer for Obscura: layout (taffy) and, with the paint feature, text and raster output for screenshots." [features] default = [] # Rasterize the laid-out tree to a pixmap (tiny-skia) with text (cosmic-text # shaping + line breaking, ab_glyph fallback) and images. # Off by default; the layout core (getBoundingClientRect etc.) works without it. paint = ["dep:tiny-skia", "dep:ab_glyph", "dep:cosmic-text", "dep:image", "dep:ureq", "dep:base64", "dep:resvg", "dep:usvg", "dep:url"] [dependencies] taffy = { workspace = true } obscura-dom = { workspace = true } tiny-skia = { workspace = true, optional = true } ab_glyph = { workspace = true, optional = true } # Real inline text layout: HarfBuzz-class shaping (rustybuzz) + UAX#14 line # breaking, the same algorithms browsers use. Built with only our embedded # fonts (no system-font scan) so layout stays deterministic across hosts. cosmic-text = { version = "=0.12.1", default-features = false, features = ["std", "swash"], optional = true } image = { version = "0.25", default-features = false, features = ["jpeg", "png", "webp"], optional = true } ureq = { version = "2.9", default-features = false, features = ["tls"], optional = true } base64 = { workspace = true, optional = true } # SVG rasterization for , inline , and background-image # SVGs, all extremely common for logos/icons. Pure Rust, CPU, no system deps, # same deterministic-rendering guarantee as the rest of this crate. resvg = { version = "0.47", default-features = false, features = ["text", "raster-images"], optional = true } usvg = { version = "0.47", default-features = false, optional = true } url = { workspace = true, optional = true } cssparser = "0.34" [lib] path = "src/lib.rs" [[bin]] name = "paint_file" path = "src/bin/paint_file.rs" required-features = ["paint"]