Repository navigation
Add travel-sized deck layout (87x32mm) - #3530
Mahaboobunnisa123 wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Thanks for adding the travel size! I rendered the branch through Scribus (--edition webapp --language en --size travel) to check it, and the landscape layout has some problems that come from reusing the portrait bridge artwork.
Before: this PR as it stands (landscape, cropped to trim)
- Artwork is stretched about 3.3x sideways.
asset_key: "small"loads the portrait bridge art (804x1170) and the card back (602x877) into a 99x44mm frame, andplace_artwork_framescales to fill without keeping proportions. The bridge's vertical suit strip becomes a block across the left third of the card, and the back logo is distorted and cropped. - Number cards lose their number. The pip value is drawn in the suit colour, which is the same colour as the stretched strip behind it (AT5's "5" is
#6da7c3on#6da7c3). - The suit name is mostly unreadable. It is white, and only "AUT" lands on the strip. The suit band above it is mostly in the bleed, so very little survives trimming.
- Frames sit on or past the trim. Card number and attack text start exactly on the left trim line, and
url_textends at 252.4pt on a 246.6pt page.
Suggestion: make the travel card portrait
A portrait travel card (32x87mm trim) is the same height as bridge, just 24mm narrower, so the bridge template's vertical layout carries over almost unchanged. The attached patch (it applies cleanly to this branch's head) does that:
travel_master.slais rebuilt fromsmall_master.sla: page 90.71x246.61pt portrait, card border and back frames 44x99mm, text column 7mm to 30mm from the left trim, attack text frame taller (down to the QR code),Style_SpecialTextline spacing 5.8pt, and the rotated suit name re-centred on the visible strip.pdf_config.yaml:width_mm: 44,height_mm: 99,special_text_y_offset: 13, font sizes 4.8 / 5.0 / 4.6, andjoker_label: "Jk".generate_deck.py: one line, so a size profile'sjoker_labeltakes priority over the card'scardvalue ("Joker" does not fit the narrow number frame).pdf_generation_itest.py: three tests for the joker label override. All 28 tests in the file pass, and Black is clean.
After: with the patch (portrait, cropped to trim)
Shown are AT5, C2 and AT6 (the two longest attack texts in the webapp deck), VEA (longest suit name, ace with special text) and both jokers. Everything fits with room to spare, numbers are visible, and suit names read down the strip as on bridge.
Still open
- Artwork aspect ratio. Portrait still squeezes the bridge art about 1.55x horizontally. That's acceptable for the plain suit strip, but the back logo is visibly narrow, and the strip is only 4.3mm wide after trimming, so a small cutting error will make the suit name look off-centre. Dedicated travel artwork (
asset_key: "travel"with<suit>-travel-default.png,<suit>-travel-court.pngandback_of_card_travel_expanded_outlined_6mmbleed.png) would fix both, with no code change, because asset lookup already usesasset_key. The suit name frame would then need re-centring on the new strip. joker_labelisn't translated. It replaces the translated joker name, so every language shows "Jk". If that matters, it could be keyed by language.- Right margin is 2mm. That's tighter than bridge's 3.5mm. Worth checking against the printer's safe zone.
- Not yet verified. These renders used Arial in place of Noto Sans (not installed on the rendering machine), and only English webapp cards were checked. Longer translations (ru, uk, hi) and the mobileapp and companion editions still need a render.
rewtd
left a comment
There was a problem hiding this comment.
Review and apply the patch, merge master in and then look at the outstanding issues to see if you can correct those.
|
@rewtd thank you for reviewing, I will go through the suggestions. |
|
The back of the card will need a complete redesign. I'll see if I can have a look at it. |
|
@Mahaboobunnisa123 Can you move your branch over to the owasp/cornucopia repository. That way, I can more easily commit the artwork to it? |
|
@Mahaboobunnisa123 I finished the /owasp_cornucopia_webapp_ver_cards_air_qr_lang.idml template and generated the pdf so that you get a better idea of the font sizes and format we are looking for. We should create similar templates for the companion and mobile edition. We'll keep the issue open until we have idml templates and scribus templates for all the 3 editions. See the attached PDF as a reference. |
Description
This PR adresses part of #3483 by adding the requested "travel" size card profile (87x32mm).
To get this working, I added a new travel entry to pdf_config.yaml and created a dedicated landscape Scribus template (travel_master.sla).
What's changed:
Testing
I ran the generation scripts locally to verify the config and make sure nothing else broke. The engine successfully parses all 1,278 travel cards across all editions without warnings, and the existing bridge and tarot builds are completely unaffected.
PS D:\cornucopia\scripts\pdf_generation> python generate_deck.py --dry-run

Resolved or fixed issue: Addressed #3483
AI Tool Disclosure
[e.g. GitHub CoPilot, ChatGPT, JetBrains Junie etc.][e.g. GPT-4.1, Claude Haiku 4.5, Gemini 2.5 Pro etc.][Summarize the key prompts or instructions given to the AI tools]Affirmation