docs: document format_lore_text() auto-paragraphing bypass for precise break control
Made-with: Cursor
This commit is contained in:
@@ -70,6 +70,8 @@ This uses the same `format_lore_text()` + `set_text_content()` pipeline as `gene
|
||||
|
||||
**NEVER** extract lore from SVG tspans, edit it, and reinsert. Tspan line-wrap boundaries eat spaces when concatenated (e.g., "percentof", "aresolved"). Always write complete clean text.
|
||||
|
||||
**Paragraph break control**: `rewrite-lore.py` calls `format_lore_text()` which auto-re-paragraphs text at evenly-spaced sentence boundaries, overriding any explicit `\n\n` breaks in your input. If you need precise control over where paragraph breaks fall (e.g., to set up a punchline), bypass `format_lore_text()` and call `gc.set_text_content(lore_el, text_with_explicit_breaks, wrap_width=42)` directly in a Python one-liner. See the Dragonspit Ampoule commit for an example.
|
||||
|
||||
### To extend the lore text field (when lore clips at bottom):
|
||||
|
||||
Lore text on the card back is rendered inside a `shape-inside` SVG rect. If lore clips at the bottom edge, extend the rect. The technique: find the rect ID from the lore text element's `shape-inside:url(#rectID)` style, then adjust its `y` (move up) and `height` (grow down). A safe default is y-5, height+20 (about one extra line of text).
|
||||
|
||||
Reference in New Issue
Block a user