Improve modern layout and viewport rendering

This commit is contained in:
SGavrl committed 2026-07-30 20:24:57 +00:00
1 parent aff0172987
commit 10b8492116
22 files changed
+5978 -450

No files matched your search

+5 -1
View File
@@ -11,7 +11,7 @@ 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", "dep:wuff"]
paint = ["dep:tiny-skia", "dep:ab_glyph", "dep:cosmic-text", "dep:swash", "dep:image", "dep:ureq", "dep:base64", "dep:resvg", "dep:usvg", "dep:url", "dep:wuff"]
[dependencies]
taffy = { workspace = true }
@@ -22,6 +22,10 @@ ab_glyph = { workspace = true, optional = true }
# 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 }
# Keep this exactly aligned with cosmic-text 0.12's raster backend. Cosmic
# does not expose variation coordinates, so variable font instances are
# rasterized through Swash directly while Cosmic remains the shaper.
swash = { version = "=0.1.19", 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 }