Colors: oklch()/oklab() and color-mix(); linear-gradient backgrounds. Grid: named-line placement, repeat() expansion, drop whitespace-only grid items; upgrade taffy 0.7 -> 0.12 so aspect-ratio images in auto-height rows no longer collapse to slivers. CSS: @layer, nesting, @property, :is()/:where(), clamp(), @media not all; source/track/param/area and svg desc/metadata as display:none. Images: webp + intrinsic sizing, srcset/picture, browser UA + Accept for CDN fetches, grey placeholder on failure; width/height HTML attributes rank below author CSS with aspect-ratio preserved for auto axes.
42 lines
2.0 KiB
TOML
42 lines
2.0 KiB
TOML
[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 <img src="*.svg">, inline <svg>, 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"]
|