fix(pdf): make backend text shaping opt-in

This commit is contained in:
skylar taylor-barrick
2026-10-14 00:01:36 -06:00
parent c3487320b2
commit f39922b214
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ repository = "https://github.com/storytold/craft-libs"
[workspace.dependencies]
# internal: add each crate here as `craft-<name> = { path = "crates/<name>" }`
craft-pdf = { path = "crates/pdf", version = "=0.1.0" }
krilla = "=0.8.2"
krilla = { version = "=0.8.2", default-features = false, features = ["raster-images"] }
thiserror = "2"
craft-atomic = { path = "crates/atomic" }
craft-cms = { path = "crates/cms" }
+1
View File
@@ -14,6 +14,7 @@ workspace = true
default = []
write = ["dep:krilla", "dep:thiserror"]
write-pdf = ["write", "krilla/pdf"]
write-simple-text = ["write", "krilla/simple-text"]
[dependencies]
krilla = { workspace = true, optional = true }
+5 -3
View File
@@ -5,10 +5,12 @@ layout, shaping, font selection and licensing, tagging, colour policy, print pre
export presets and postprocessing. There is no GUI or application dependency.
Features are explicit: `default = []`; `write` enables authoring; `write-pdf` additionally
supports embedding existing PDF pages. WordCraft, DeckCraft and VectorCraft use `write`.
supports embedding existing PDF pages. WordCraft and VectorCraft use `write`.
Applications that call Krilla's `draw_text`, such as DeckCraft, also need `write-simple-text`.
DesignCraft uses `write-pdf` for placed PDF pages and book composition. Plain `write` does
not enable Hayro parsing, interpretation or its image codecs; Krilla's existing raster-image
and simple-text support remain enabled. Reading dependencies used to inspect test outputs
not enable Hayro parsing, interpretation or its image codecs. Krilla's raster-image support
remains enabled, while its optional text shaper is enabled only by `write-simple-text`.
Applications that supply shaped glyphs do not need that feature. Reading dependencies used to inspect test outputs
are dev-only. A reader migration can be reviewed and adopted separately.
The writer pins Krilla 0.8.2, with a local unwind-cleanup patch documented in