Skip to content

feat: bump default watermark.size and add theme.watermark.margin (#97) - #98

Merged
otnc merged 1 commit into
mainfrom
feat/issue-97-watermark-size-and-margin
Sep 3, 2026
Merged

feat: bump default watermark.size and add theme.watermark.margin (#97)#98
otnc merged 1 commit into
mainfrom
feat/issue-97-watermark-size-and-margin

Conversation

@otnc

@otnc otnc commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #97.

  • Default size bump: theme.watermark.size goes from 0.024 to 0.04 — about 1.7x, matching the sweet spot found across several rounds of side-by-side new-layout renders in the issue. This affects both the text watermark and, by inheriting the same fallback, theme.watermark.imageSize when left unset.
  • Configurable margin: the watermark's corner inset was two hardcoded 0.04 literals (theme.width * 0.04 for the horizontal margin, theme.height * 0.96 — i.e. the same 0.04 from the bottom — for the vertical one). Both now come from a single theme.watermark.margin (default 0.04, so nothing moves unless you opt in), applied to both axes since it's the same "distance from the corner" concept either way.

Test plan

  • npm run ci (biome)
  • npm run typecheck
  • npm run test (873 tests, all green; new margin regression test verified red against the pre-fix code — Unknown theme property "theme.watermark.margin" — then green after)
  • npm run build
  • npm run check:build (27 checks passed)

Bumps the default theme.watermark.size from 0.024 to 0.04 (~1.7x, per
side-by-side rendering rounds in the issue) — the old default read faint
even for a short text tag, and worse once an image watermark could be
drawn at it. theme.watermark.imageSize inherits the same bump since it
falls back to size by default.

Also lifts the watermark's corner margin out of a pair of hardcoded 0.04
literals (theme.width * 0.04 horizontally, theme.height * 0.96 — i.e. the
same 0.04 — vertically) into theme.watermark.margin, applied to both axes.
Defaults to 0.04, matching the previous hardcoded behavior exactly, but
now overridable without patching the render function.

Closes #97.
@otnc
otnc merged commit 9266e44 into main Sep 3, 2026
7 checks passed
@otnc
otnc deleted the feat/issue-97-watermark-size-and-margin branch September 3, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default watermark size still reads small, and its bottom margin isn't configurable

1 participant