Files
deckcraft/crates/text/Cargo.toml
T
d556ff98b5 Fields: date fields show today's date in their own format (#36)
Every datetime field showed the deck-wide fixed date text instead of a date: empty when no slide
had a fixed date, and that text on every slide when one did. A fixed date is plain text in its
slide's placeholder; a field is an automatic date, so it now shows the local date and time in the
format of its type (ECMA-376 datetime1 to datetime13 as PowerPoint lists them for English,
datetime and datetimeFigureOut the short date). Numeric dates follow the run's language
(en-GB 09/10/2026, de-DE 09.10.2026...); formats with names stay English-only, so other languages
keep the field's saved text, as do unknown types and builds without a clock (wasm). The saved
text is kept on save.

- text: datetime module (field types, formats, local clock via chrono, not on wasm);
  Fields::field_in passes the run's language.
- render: RenderOpts::now injects the clock (tests, deterministic output); the PDF text layer
  uses the same fields.
- engine: Header & Footer turns existing date placeholders into fixed text or back into a
  field; new date fields are saved with the date they show (local, not UTC).

Co-authored-by: lloyd <lloyd@stackworx.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-10-10 06:25:32 -04:00

23 lines
749 B
TOML

[package]
name = "deckcraft-text"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "DeckCraft text layout: runs to shaped glyph lines with bullets, indents, spacing, alignment, anchoring, autofit and caret hit testing"
[lints]
workspace = true
[dependencies]
deckcraft-model = { workspace = true }
deckcraft-geom = { workspace = true }
deckcraft-color = { workspace = true }
deckcraft-fonts = { workspace = true }
unicode-linebreak = { workspace = true }
unicode-segmentation = { workspace = true }
unicode-bidi = { workspace = true }
# The local clock for date fields (no clock on wasm: fields keep their saved text).
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
chrono = { workspace = true }