Repository navigation
Automated release for commit 841a031.
v1.34: typography, overlay lifecycle and install fixes
A full review pass over the plugin, its test suite and the install tooling.
No gameplay rules or saved-game formats changed; existing saves load as before.
Fixed
- High-DPI typography no longer scales twice. KOReader's
Font:getFace
already appliesScreen:scaleBySize, so pre-scaled sizes rendered text up to
~2x too large on 1072px/1448px canvases. Every font size is now raw, layout
dimensions stay scaled, font sizes derived from a scaled dimension go through
the newMahjongUI.scaledToRaw(), and help-tile icons use the same path
(the old/Screen:scaleBySize(1)un-scale rounded the factor up). - A dead-board shuffle can no longer corrupt a replaced board. The
candidate search is bound to the board it started on; New Game, a layout
change and close cancel it, and board-mutating input (taps, undo, hint,
auto-solve) is ignored while it runs. - Floating overlays can no longer outlive a restart. The layout picker,
help, settings, stats, win summary and Home-key exit card are tracked on the
owner and dismissed on relaunch/close. Open methods are idempotent (no
stacked pickers or cards), owner close hooks fire exactly once, and a
framework-driven settings close resumes the clock/Awake it paused. - Third-party layouts no longer leak
layout.<id>. The picker, the stats
card and the win summary fall back to the layout's registered name when no
catalog entry exists. - Board geometry cache now follows a re-registered layout (the bounds were
stale afterregisterLayouton an existing id). - Help close hook ran twice (dialog close plus
CloseWidget); it now runs
once.
Tests and CI
- Regression coverage added for the stale shuffle, overlay lifecycle (including
the exit card), raw font requests, thefitTextFaceshrink loop, custom
layout labels, bounds-cache invalidation, and icon scaling on a rounding
canvas. - The test mock's
Font:getFacenow mirrors KOReader: it scales once and
exposesorig_size, so a call site that pre-scales a font fails the suite. - New
Testsworkflow (pushes to main and pull requests).release.ymlnow
runs the suite before publishing and serialises releases. - Removed the committed
preview.png; extended.gitignore.
Install tooling
install_plugin.shauto-detects the Kindle's Windows drive letter (it is not
alwaysD:), supports--drive E:,KINDLE_DRIVEandKINDLE_MOUNT,
reuses an existing mount, cleans up a mount it created when the copy fails,
and no longer mounts an unrelatedD:.
Docs
- Corrected chain-scoring rules (only identical faces chain, plus any two
flowers / any two seasons), Spanish support, the 24-id layout registry and
picker ordering, and marked US-51/US-52 complete.
Installation
- Download the
mahjong.koplugin-v1.34.zipasset from this release. - Extract the ZIP file directly into KOReader's
plugins/directory. The archive already contains the completemahjong.koplugin/folder, so it should createplugins/mahjong.koplugin/. - Do not copy only the Lua files; keep the entire plugin folder and its
icons/directory intact. - Fully restart KOReader, because plugins are loaded during startup.
- Open Tools -> Mahjong Solitaire from the KOReader menu.