fix(engine): render bottom-right card glyph upright (no 180° rotation)

The user noticed the bottom-right large suit glyphs were
rendering upside-down — point-up hearts, stem-up spades — because
the SVG transform pipeline applied a `rotate(180)` to match the
traditional playing-card inverted-corner convention.

That convention exists so a card reads correctly when flipped or
read from the opposite side of the table. Single-orientation
digital play doesn't benefit from it; most modern digital decks
have abandoned it. User preference is upright.

Drops the rotate from face_svg's bottom-right `<g transform>`
and adjusts the translate so the visible glyph still lands at
(178, 286)–(242, 350) — same screen footprint, same scale, just
no flip.

design-system.md § Game Cards updated in lockstep — line 220
no longer says "rotated 180°", instead documents the deliberate
deviation from the traditional convention.

Knock-on lockstep changes in this commit:
- EXPECTED in tests/card_face_svg_pin.rs rebaselined: 52 face
  hashes shift, 5 back hashes unchanged.
- assets/cards/faces/*.png regenerated (52 face PNGs).
- solitaire_engine/assets/themes/default/*_*.svg regenerated
  (52 theme face SVGs that production rasterises at startup).

Workspace clippy + cargo test --workspace clean. Pin test
passes against the new hashes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-08 10:09:55 -07:00
parent af414b6aed
commit dd101b3d54
107 changed files with 325 additions and 318 deletions
+52 -52
View File
@@ -24,58 +24,58 @@ use solitaire_engine::assets::card_face_svg::{
use solitaire_engine::assets::rasterize_svg;
const EXPECTED: &[(&str, u64)] = &[
("face_AC", 0x79b449cb455e496d),
("face_2C", 0x10a1056c4800c45e),
("face_3C", 0xbd128e390e06673a),
("face_4C", 0x949c323c78a804c0),
("face_5C", 0xd396d5ed99fb57e9),
("face_6C", 0x15519c6d72d1720f),
("face_7C", 0xc24bdc1a2d380d78),
("face_8C", 0x36464f4ab4cf672e),
("face_9C", 0x32add2eb53b1aec4),
("face_10C", 0x68619202f29481fc),
("face_JC", 0x116b3eeac58e0f58),
("face_QC", 0xb149ab5b2cac85e3),
("face_KC", 0x2a9fd2c63b99bd3b),
("face_AD", 0xe49c3fec2c01817c),
("face_2D", 0x8f42b4014e0d6809),
("face_3D", 0x63ff77fa873c557b),
("face_4D", 0x33356bd9628daaf2),
("face_5D", 0x8897839054dbd808),
("face_6D", 0x03ff93fb0c05a195),
("face_7D", 0xc2b7f97f5b1cc545),
("face_8D", 0xd8515a8278d74a7b),
("face_9D", 0xfbfe52ec3bbd2962),
("face_10D", 0x8f2dfc06a1d55a2f),
("face_JD", 0x3941d34384607530),
("face_QD", 0x0dcf5a9e2fc99f02),
("face_KD", 0xb834cb89d80bd39c),
("face_AH", 0x1a2e6d2ac818093f),
("face_2H", 0x8ab9ad7d2111233e),
("face_3H", 0x5e1057fa87c90968),
("face_4H", 0x1e1550b0af8a35a5),
("face_5H", 0x77404642251596d3),
("face_6H", 0xf7bec77bcbb9f942),
("face_7H", 0x9b7c52a5c03fb4f2),
("face_8H", 0xd2623a827963fe68),
("face_9H", 0xec19380e53986015),
("face_10H", 0x1205d0ec042a7484),
("face_JH", 0xd28bf03e6e871ccb),
("face_QH", 0x78548704b4530c65),
("face_KH", 0x9708e6c2d9c3bedf),
("face_AS", 0xebabc54128f38105),
("face_2S", 0xaac2970387b18ffe),
("face_3S", 0xb0864e78a6802bea),
("face_4S", 0xd118bc992bd41330),
("face_5S", 0x7fb7d6040d9b0641),
("face_6S", 0xbc048e82f1079637),
("face_7S", 0x147ee7c002e43648),
("face_8S", 0xfed30db056fbaa8e),
("face_9S", 0x332bc2060d8fcca4),
("face_10S", 0x0b810ffaf105421c),
("face_JS", 0x2ea7b956f2f23c28),
("face_QS", 0xedca2e002087ae6b),
("face_KS", 0x92e486d4e96ac4a3),
("face_AC", 0xdac8c6f869cea53c),
("face_2C", 0x8976454d1919bfdb),
("face_3C", 0x0eda320371ca2d3f),
("face_4C", 0x2e921081296553c9),
("face_5C", 0xdb574a322d615af0),
("face_6C", 0xad93daa160b5e7fa),
("face_7C", 0xa3cdae097cb23271),
("face_8C", 0x7b652bc9f0a5940b),
("face_9C", 0xb5b274c80f319b85),
("face_10C", 0x2ed8324f84c443cd),
("face_JC", 0x3d9bc380e83d7611),
("face_QC", 0xacad01ad4053a396),
("face_KC", 0xba575aa772fc2e3e),
("face_AD", 0xe1049b5a7d2c110c),
("face_2D", 0x58f2a7e60a5cfff9),
("face_3D", 0x89aeece03e7afe0b),
("face_4D", 0xb97dd2633958d6ba),
("face_5D", 0x32b57300e16c5b30),
("face_6D", 0xd617e851d97f4a7d),
("face_7D", 0xdd2da9b2457bfded),
("face_8D", 0xfe00cf683015f30b),
("face_9D", 0x7188b0fade3d086a),
("face_10D", 0x53d0db517868e1f7),
("face_JD", 0xeb2c6a0192146258),
("face_QD", 0x36edafbbc3d34f0a),
("face_KD", 0x1bbfa8b1176ee3ac),
("face_AH", 0x2c8e05964b5e3a5f),
("face_2H", 0xb44e68b79bb3842e),
("face_3H", 0x15226ed29769e1c4),
("face_4H", 0xe28c86ba92a3aee9),
("face_5H", 0x18276e48b28d0f6b),
("face_6H", 0xcca5e60e65724eaa),
("face_7H", 0x7f3eee634137f13a),
("face_8H", 0x8974515a8904d6c4),
("face_9H", 0x2f8155cd7690d4b9),
("face_10H", 0x78142f898fd66578),
("face_JH", 0x5e6df78654a1de73),
("face_QH", 0xc231ae8c25d877a9),
("face_KH", 0x55a0a772baf3e97f),
("face_AS", 0xc90e798aebdc1c5f),
("face_2S", 0x4178c699a726ea70),
("face_3S", 0xdfcd34480bb06f4c),
("face_4S", 0xdbd4938042afb02e),
("face_5S", 0x8741456ab1ec58ab),
("face_6S", 0x6d2632f648f1c34d),
("face_7S", 0x3c05c70ff3d93ea6),
("face_8S", 0x12d7f456efbaffe0),
("face_9S", 0x11b6ade208b8fa12),
("face_10S", 0x475d4110834b6b2a),
("face_JS", 0x52525a2200c07246),
("face_QS", 0xb4f0251a2757cbb1),
("face_KS", 0x1e1975919bb9a029),
("back_0", 0xf698d0e161eae13a),
("back_1", 0x446fdc0a3c83a03a),
("back_2", 0xcf188fdec9f5819a),